pub struct SplitMut<P: PackedField, Data: DerefMut<Target = [P]>> { /* private fields */ }Expand description
Guards the two halves of a buffer that was split along its highest variable.
Holds the parent store, and lends each half out as a mutable view.
Implementations§
Source§impl<P: PackedField, Data: DerefMut<Target = [P]>> SplitMut<P, Data>
impl<P: PackedField, Data: DerefMut<Target = [P]>> SplitMut<P, Data>
Sourcepub fn halves(&mut self) -> (FieldSliceMut<'_, P>, FieldSliceMut<'_, P>)
pub fn halves(&mut self) -> (FieldSliceMut<'_, P>, FieldSliceMut<'_, P>)
Lends the two halves out as mutable views, the low half first.
A half of whole words is a view straight onto the store, so edits land at once. A narrower half is a view onto a detached word, so edits land when this guard drops.
Trait Implementations§
Source§impl<P: Debug + PackedField, Data: Debug + DerefMut<Target = [P]>> Debug for SplitMut<P, Data>
impl<P: Debug + PackedField, Data: Debug + DerefMut<Target = [P]>> Debug for SplitMut<P, Data>
Auto Trait Implementations§
impl<P, Data> Freeze for SplitMut<P, Data>
impl<P, Data> RefUnwindSafe for SplitMut<P, Data>where
Data: RefUnwindSafe,
P: RefUnwindSafe,
impl<P, Data> Send for SplitMut<P, Data>where
Data: Send,
impl<P, Data> Sync for SplitMut<P, Data>where
Data: Sync,
impl<P, Data> Unpin for SplitMut<P, Data>
impl<P, Data> UnsafeUnpin for SplitMut<P, Data>where
Data: UnsafeUnpin,
P: UnsafeUnpin,
impl<P, Data> UnwindSafe for SplitMut<P, Data>where
Data: UnwindSafe,
P: UnwindSafe,
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>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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