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<'_>
impl OpenBuffer<'_>
fn get(&self) -> &BufferData
fn get_mut(&mut self) -> &mut BufferData
pub(crate) fn kill(&mut self) -> bool
pub(crate) fn lisp_buffer<'ob>(&self, cx: &'ob Context<'_>) -> &'ob LispBuffer
pub(crate) fn insert(&mut self, arg: Gc<ObjectType<'_>>) -> Result<()>
pub(crate) fn slice_with_gap( &self, beg: usize, end: usize, ) -> Result<(&str, &str)>
pub(crate) fn delete(&mut self, beg: usize, end: usize) -> Result<()>
fn in_range(&self, pos: usize) -> Result<usize>
Trait Implementations§
Source§impl PartialEq<LispBuffer> for OpenBuffer<'_>
impl PartialEq<LispBuffer> for OpenBuffer<'_>
Source§impl PartialEq<OpenBuffer<'_>> for LispBuffer
impl PartialEq<OpenBuffer<'_>> for LispBuffer
Source§impl PartialEq<str> for OpenBuffer<'_>
impl PartialEq<str> for OpenBuffer<'_>
Source§impl<'new> WithLifetime<'new> for OpenBuffer<'_>
impl<'new> WithLifetime<'new> for OpenBuffer<'_>
type Out = OpenBuffer<'new>
unsafe fn with_lifetime(self) -> Self::Out
Source§impl<'a> Debug for OpenBuffer<'a>
impl<'a> Debug for OpenBuffer<'a>
Source§impl Deref for OpenBuffer<'_>
impl Deref for OpenBuffer<'_>
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more