rune::core::object::buffer

Struct OpenBuffer

Source
pub(crate) struct OpenBuffer<'a> {
    data: MutexGuard<'a, Option<BufferData>>,
    back_ref: &'a LispBuffer,
}
Expand description

A Handle to an open buffer. Only one thread can hold this at a time.

Fields§

§data: MutexGuard<'a, Option<BufferData>>§back_ref: &'a LispBuffer

Implementations§

Source§

impl OpenBuffer<'_>

Source

fn get(&self) -> &BufferData

Source

fn get_mut(&mut self) -> &mut BufferData

Source

pub(crate) fn kill(&mut self) -> bool

Source

pub(crate) fn lisp_buffer<'ob>(&self, cx: &'ob Context<'_>) -> &'ob LispBuffer

Source

pub(crate) fn insert(&mut self, arg: Gc<ObjectType<'_>>) -> Result<()>

Source

pub(crate) fn slice_with_gap( &self, beg: usize, end: usize, ) -> Result<(&str, &str)>

Source

pub(crate) fn delete(&mut self, beg: usize, end: usize) -> Result<()>

Source

fn in_range(&self, pos: usize) -> Result<usize>

Trait Implementations§

Source§

impl PartialEq<LispBuffer> for OpenBuffer<'_>

Source§

fn eq(&self, other: &LispBuffer) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<OpenBuffer<'_>> for LispBuffer

Source§

fn eq(&self, other: &OpenBuffer<'_>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<str> for OpenBuffer<'_>

Source§

fn eq(&self, other: &str) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'new> WithLifetime<'new> for OpenBuffer<'_>

Source§

type Out = OpenBuffer<'new>

Source§

unsafe fn with_lifetime(self) -> Self::Out

Source§

impl<'a> Debug for OpenBuffer<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Deref for OpenBuffer<'_>

Source§

type Target = BufferData

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl DerefMut for OpenBuffer<'_>

Source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.

Auto Trait Implementations§

§

impl<'a> Freeze for OpenBuffer<'a>

§

impl<'a> !RefUnwindSafe for OpenBuffer<'a>

§

impl<'a> !Send for OpenBuffer<'a>

§

impl<'a> Sync for OpenBuffer<'a>

§

impl<'a> Unpin for OpenBuffer<'a>

§

impl<'a> !UnwindSafe for OpenBuffer<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.