pub struct BufferStateGuard<S: Send + Sync + 'static> { /* private fields */ }Expand description
Drops a buffer’s state entry when its mode deactivates.
Handler registrations are no longer per-activation anywhere in this crate, so what is left to unwind is the state entry, the published view, and (MG.14) the headerline’s virtual-row provider.
Implementations§
Source§impl<S: Send + Sync + 'static> BufferStateGuard<S>
impl<S: Send + Sync + 'static> BufferStateGuard<S>
pub fn new(states: Arc<BufferStates<S>>, buffer: BufferId) -> Self
Sourcepub fn with_views(self, views: MagitViewsHandle) -> Self
pub fn with_views(self, views: MagitViewsHandle) -> Self
Also unpublish this buffer’s MagitView on drop.
Sourcepub fn with_headerline(
self,
registration: Option<HeaderlineRegistration>,
) -> Self
pub fn with_headerline( self, registration: Option<HeaderlineRegistration>, ) -> Self
Also tear down this buffer’s headerline on drop. None (a
harness with no virtual-row registrar) is a no-op.
Trait Implementations§
Auto Trait Implementations§
impl<S> !RefUnwindSafe for BufferStateGuard<S>
impl<S> !UnwindSafe for BufferStateGuard<S>
impl<S> Freeze for BufferStateGuard<S>
impl<S> Send for BufferStateGuard<S>
impl<S> Sync for BufferStateGuard<S>
impl<S> Unpin for BufferStateGuard<S>
impl<S> UnsafeUnpin for BufferStateGuard<S>
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more