pub struct MutFoldChainSliceStruct<'a, IsReversed: Bool, IsFlushLeft: Bool, IsFlushRight: Bool, T, D: Clone, Settings: FoldSettings<T, D> + 'a, Simplification: FoldSimplification<T, D> + 'a> { /* private fields */ }Expand description
The struct responsible for most mutable views into a FoldChain.
Trait Implementations§
Source§impl<'a, IsReversed: Bool, IsFlushLeft: Bool, IsFlushRight: Bool, T: Debug, D: Clone, Settings: FoldSettings<T, D> + 'a, Simplification: FoldSimplification<T, D> + 'a> Debug for MutFoldChainSliceStruct<'a, IsReversed, IsFlushLeft, IsFlushRight, T, D, Settings, Simplification>
impl<'a, IsReversed: Bool, IsFlushLeft: Bool, IsFlushRight: Bool, T: Debug, D: Clone, Settings: FoldSettings<T, D> + 'a, Simplification: FoldSimplification<T, D> + 'a> Debug for MutFoldChainSliceStruct<'a, IsReversed, IsFlushLeft, IsFlushRight, T, D, Settings, Simplification>
Source§impl<'a, IsReversed: Bool, IsFlushLeft: Bool, IsFlushRight: Bool, T, D: Clone, Settings: FoldSettings<T, D> + 'a, Simplification: FoldSimplification<T, D> + 'a> FoldChainSlice<'a, T, <Simplification as FoldSimplification<T, D>>::D2> for MutFoldChainSliceStruct<'a, IsReversed, IsFlushLeft, IsFlushRight, T, D, Settings, Simplification>
impl<'a, IsReversed: Bool, IsFlushLeft: Bool, IsFlushRight: Bool, T, D: Clone, Settings: FoldSettings<T, D> + 'a, Simplification: FoldSimplification<T, D> + 'a> FoldChainSlice<'a, T, <Simplification as FoldSimplification<T, D>>::D2> for MutFoldChainSliceStruct<'a, IsReversed, IsFlushLeft, IsFlushRight, T, D, Settings, Simplification>
Source§type IsReversed = IsReversed
type IsReversed = IsReversed
A type-level boolean indicating whether this view has been reversed an odd number of times
Source§type IsFlushLeft = IsFlushLeft
type IsFlushLeft = IsFlushLeft
A type-level boolean indicating whether this view necessarily shares the base
FoldChain’s left endpointSource§type IsFlushRight = IsFlushRight
type IsFlushRight = IsFlushRight
A type-level boolean indicating whether this view necessarily shares the base
FoldChain’s right endpointSource§type Simplification = Simplification
type Simplification = Simplification
The type of the current simplification
Source§fn get_current_simplification(&self) -> Self::Simplification
fn get_current_simplification(&self) -> Self::Simplification
Get a copy of the current simplification. Will be
() if no simplification has been applied.Source§fn as_imm(
self,
) -> ImmFoldChainSliceStruct<'a, Self::IsReversed, Self::IsFlushLeft, Self::IsFlushRight, Self::Settings, Self::Simplification, T, Self::OriginalD>
fn as_imm( self, ) -> ImmFoldChainSliceStruct<'a, Self::IsReversed, Self::IsFlushLeft, Self::IsFlushRight, Self::Settings, Self::Simplification, T, Self::OriginalD>
Make this view immutable.
Source§fn borrow<'b>(
&'b self,
) -> ImmFoldChainSliceStruct<'b, Self::IsReversed, Self::IsFlushLeft, Self::IsFlushRight, Self::Settings, Self::Simplification, T, Self::OriginalD>
fn borrow<'b>( &'b self, ) -> ImmFoldChainSliceStruct<'b, Self::IsReversed, Self::IsFlushLeft, Self::IsFlushRight, Self::Settings, Self::Simplification, T, Self::OriginalD>
Immutably borrow this view.
Source§fn debug_check_structural_integrity(&self) -> bool
fn debug_check_structural_integrity(&self) -> bool
debug_assert! that the backing data structure is in a valid state. You should never have to use this.Source§fn view_drop_left_until(
self,
predicate: impl Fn(&D) -> bool,
) -> ImmFoldChainSliceStruct<'a, Self::IsReversed, <Self::IsFlushLeft as Bool>::And<Self::IsReversed>, <Self::IsFlushRight as Bool>::And<<Self::IsReversed as Bool>::Not>, Self::Settings, Self::Simplification, T, Self::OriginalD>
fn view_drop_left_until( self, predicate: impl Fn(&D) -> bool, ) -> ImmFoldChainSliceStruct<'a, Self::IsReversed, <Self::IsFlushLeft as Bool>::And<Self::IsReversed>, <Self::IsFlushRight as Bool>::And<<Self::IsReversed as Bool>::Not>, Self::Settings, Self::Simplification, T, Self::OriginalD>
Contract this view on the left while the to-be-discarded range’s fold doesn’t meet
predicate. Read moreSource§fn view_take_right_until(
self,
predicate: impl Fn(&D) -> bool,
) -> ImmFoldChainSliceStruct<'a, Self::IsReversed, <Self::IsFlushLeft as Bool>::And<Self::IsReversed>, <Self::IsFlushRight as Bool>::And<<Self::IsReversed as Bool>::Not>, Self::Settings, Self::Simplification, T, Self::OriginalD>
fn view_take_right_until( self, predicate: impl Fn(&D) -> bool, ) -> ImmFoldChainSliceStruct<'a, Self::IsReversed, <Self::IsFlushLeft as Bool>::And<Self::IsReversed>, <Self::IsFlushRight as Bool>::And<<Self::IsReversed as Bool>::Not>, Self::Settings, Self::Simplification, T, Self::OriginalD>
Restrict this view to the longest range that starts on the right and whose fold doesn’t meet
predicate. Read moreSource§fn view_drop_right_until(
self,
predicate: impl Fn(&D) -> bool,
) -> ImmFoldChainSliceStruct<'a, <<Self::IsReversed as Bool>::Not as Bool>::Not, <Self::IsFlushLeft as Bool>::And<<Self::IsReversed as Bool>::Not>, <Self::IsFlushRight as Bool>::And<<<Self::IsReversed as Bool>::Not as Bool>::Not>, Self::Settings, Self::Simplification, T, Self::OriginalD>
fn view_drop_right_until( self, predicate: impl Fn(&D) -> bool, ) -> ImmFoldChainSliceStruct<'a, <<Self::IsReversed as Bool>::Not as Bool>::Not, <Self::IsFlushLeft as Bool>::And<<Self::IsReversed as Bool>::Not>, <Self::IsFlushRight as Bool>::And<<<Self::IsReversed as Bool>::Not as Bool>::Not>, Self::Settings, Self::Simplification, T, Self::OriginalD>
Contract this view on the right while the to-be-discarded range’s fold doesn’t meet
predicate. Read moreSource§fn view_take_left_until(
self,
predicate: impl Fn(&D) -> bool,
) -> ImmFoldChainSliceStruct<'a, <<Self::IsReversed as Bool>::Not as Bool>::Not, <Self::IsFlushLeft as Bool>::And<<Self::IsReversed as Bool>::Not>, <Self::IsFlushRight as Bool>::And<<<Self::IsReversed as Bool>::Not as Bool>::Not>, Self::Settings, Self::Simplification, T, Self::OriginalD>
fn view_take_left_until( self, predicate: impl Fn(&D) -> bool, ) -> ImmFoldChainSliceStruct<'a, <<Self::IsReversed as Bool>::Not as Bool>::Not, <Self::IsFlushLeft as Bool>::And<<Self::IsReversed as Bool>::Not>, <Self::IsFlushRight as Bool>::And<<<Self::IsReversed as Bool>::Not as Bool>::Not>, Self::Settings, Self::Simplification, T, Self::OriginalD>
Restrict this view to the longest range that starts on the left and whose fold doesn’t meet
predicate. Read moreSource§fn view_drop<Predicate: Fn(&D) -> bool, Range: SingleEndedRange<Predicate>>(
self,
range: Range,
) -> <<Range as SingleEndedRange<Predicate>>::EndIsLeft as Bool>::IfElse<ImmFoldChainSliceStruct<'a, <<<Self as FoldChainSlice<'a, T, D>>::IsReversed as Bool>::Not as Bool>::Not, <<Self as FoldChainSlice<'a, T, D>>::IsFlushLeft as Bool>::And<<<Self as FoldChainSlice<'a, T, D>>::IsReversed as Bool>::Not>, <<Self as FoldChainSlice<'a, T, D>>::IsFlushRight as Bool>::And<<<<Self as FoldChainSlice<'a, T, D>>::IsReversed as Bool>::Not as Bool>::Not>, <Self as FoldChainSlice<'a, T, D>>::Settings, <Self as FoldChainSlice<'a, T, D>>::Simplification, T, <Self as FoldChainSlice<'a, T, D>>::OriginalD>, ImmFoldChainSliceStruct<'a, <Self as FoldChainSlice<'a, T, D>>::IsReversed, <<Self as FoldChainSlice<'a, T, D>>::IsFlushLeft as Bool>::And<<Self as FoldChainSlice<'a, T, D>>::IsReversed>, <<Self as FoldChainSlice<'a, T, D>>::IsFlushRight as Bool>::And<<<Self as FoldChainSlice<'a, T, D>>::IsReversed as Bool>::Not>, <Self as FoldChainSlice<'a, T, D>>::Settings, <Self as FoldChainSlice<'a, T, D>>::Simplification, T, <Self as FoldChainSlice<'a, T, D>>::OriginalD>>
fn view_drop<Predicate: Fn(&D) -> bool, Range: SingleEndedRange<Predicate>>( self, range: Range, ) -> <<Range as SingleEndedRange<Predicate>>::EndIsLeft as Bool>::IfElse<ImmFoldChainSliceStruct<'a, <<<Self as FoldChainSlice<'a, T, D>>::IsReversed as Bool>::Not as Bool>::Not, <<Self as FoldChainSlice<'a, T, D>>::IsFlushLeft as Bool>::And<<<Self as FoldChainSlice<'a, T, D>>::IsReversed as Bool>::Not>, <<Self as FoldChainSlice<'a, T, D>>::IsFlushRight as Bool>::And<<<<Self as FoldChainSlice<'a, T, D>>::IsReversed as Bool>::Not as Bool>::Not>, <Self as FoldChainSlice<'a, T, D>>::Settings, <Self as FoldChainSlice<'a, T, D>>::Simplification, T, <Self as FoldChainSlice<'a, T, D>>::OriginalD>, ImmFoldChainSliceStruct<'a, <Self as FoldChainSlice<'a, T, D>>::IsReversed, <<Self as FoldChainSlice<'a, T, D>>::IsFlushLeft as Bool>::And<<Self as FoldChainSlice<'a, T, D>>::IsReversed>, <<Self as FoldChainSlice<'a, T, D>>::IsFlushRight as Bool>::And<<<Self as FoldChainSlice<'a, T, D>>::IsReversed as Bool>::Not>, <Self as FoldChainSlice<'a, T, D>>::Settings, <Self as FoldChainSlice<'a, T, D>>::Simplification, T, <Self as FoldChainSlice<'a, T, D>>::OriginalD>>
Source§fn view_take<Predicate: Fn(&D) -> bool, Range: SingleEndedRange<Predicate>>(
self,
range: Range,
) -> <<Range as SingleEndedRange<Predicate>>::EndIsLeft as Bool>::IfElse<ImmFoldChainSliceStruct<'a, <Self as FoldChainSlice<'a, T, D>>::IsReversed, <<Self as FoldChainSlice<'a, T, D>>::IsFlushLeft as Bool>::And<<Self as FoldChainSlice<'a, T, D>>::IsReversed>, <<Self as FoldChainSlice<'a, T, D>>::IsFlushRight as Bool>::And<<<Self as FoldChainSlice<'a, T, D>>::IsReversed as Bool>::Not>, <Self as FoldChainSlice<'a, T, D>>::Settings, <Self as FoldChainSlice<'a, T, D>>::Simplification, T, <Self as FoldChainSlice<'a, T, D>>::OriginalD>, ImmFoldChainSliceStruct<'a, <<<Self as FoldChainSlice<'a, T, D>>::IsReversed as Bool>::Not as Bool>::Not, <<Self as FoldChainSlice<'a, T, D>>::IsFlushLeft as Bool>::And<<<Self as FoldChainSlice<'a, T, D>>::IsReversed as Bool>::Not>, <<Self as FoldChainSlice<'a, T, D>>::IsFlushRight as Bool>::And<<<<Self as FoldChainSlice<'a, T, D>>::IsReversed as Bool>::Not as Bool>::Not>, <Self as FoldChainSlice<'a, T, D>>::Settings, <Self as FoldChainSlice<'a, T, D>>::Simplification, T, <Self as FoldChainSlice<'a, T, D>>::OriginalD>>
fn view_take<Predicate: Fn(&D) -> bool, Range: SingleEndedRange<Predicate>>( self, range: Range, ) -> <<Range as SingleEndedRange<Predicate>>::EndIsLeft as Bool>::IfElse<ImmFoldChainSliceStruct<'a, <Self as FoldChainSlice<'a, T, D>>::IsReversed, <<Self as FoldChainSlice<'a, T, D>>::IsFlushLeft as Bool>::And<<Self as FoldChainSlice<'a, T, D>>::IsReversed>, <<Self as FoldChainSlice<'a, T, D>>::IsFlushRight as Bool>::And<<<Self as FoldChainSlice<'a, T, D>>::IsReversed as Bool>::Not>, <Self as FoldChainSlice<'a, T, D>>::Settings, <Self as FoldChainSlice<'a, T, D>>::Simplification, T, <Self as FoldChainSlice<'a, T, D>>::OriginalD>, ImmFoldChainSliceStruct<'a, <<<Self as FoldChainSlice<'a, T, D>>::IsReversed as Bool>::Not as Bool>::Not, <<Self as FoldChainSlice<'a, T, D>>::IsFlushLeft as Bool>::And<<<Self as FoldChainSlice<'a, T, D>>::IsReversed as Bool>::Not>, <<Self as FoldChainSlice<'a, T, D>>::IsFlushRight as Bool>::And<<<<Self as FoldChainSlice<'a, T, D>>::IsReversed as Bool>::Not as Bool>::Not>, <Self as FoldChainSlice<'a, T, D>>::Settings, <Self as FoldChainSlice<'a, T, D>>::Simplification, T, <Self as FoldChainSlice<'a, T, D>>::OriginalD>>
Source§fn view_reversed(
self,
) -> ImmFoldChainSliceStruct<'a, <Self::IsReversed as Bool>::Not, Self::IsFlushLeft, Self::IsFlushRight, Self::Settings, Self::Simplification, T, Self::OriginalD>
fn view_reversed( self, ) -> ImmFoldChainSliceStruct<'a, <Self::IsReversed as Bool>::Not, Self::IsFlushLeft, Self::IsFlushRight, Self::Settings, Self::Simplification, T, Self::OriginalD>
Source§fn view_with_simplification<NewSimplification: FoldSimplification<T, D>>(
self,
new_simplification: NewSimplification,
) -> ImmFoldChainSliceStruct<'a, Self::IsReversed, Self::IsFlushLeft, Self::IsFlushRight, Self::Settings, NewSimplification::ComposeAfterOther<Self::OriginalD, Self::Simplification>, T, Self::OriginalD>
fn view_with_simplification<NewSimplification: FoldSimplification<T, D>>( self, new_simplification: NewSimplification, ) -> ImmFoldChainSliceStruct<'a, Self::IsReversed, Self::IsFlushLeft, Self::IsFlushRight, Self::Settings, NewSimplification::ComposeAfterOther<Self::OriginalD, Self::Simplification>, T, Self::OriginalD>
Compose this view’s current simplification with another one explicitly. See Simplification. Read more
Source§fn view_simplify<D2: Clone + 'a, Simplifier: for<'x> Fun<&'x D, D2> + Copy + 'a, OP2: Fun<(D2, D2), D2> + Copy + 'a>(
self,
simplifier: Simplifier,
simplified_op: OP2,
) -> ImmFoldChainSliceStruct<'a, Self::IsReversed, Self::IsFlushLeft, Self::IsFlushRight, Self::Settings, <Self::Simplification as FoldSimplification<T, Self::OriginalD>>::Compose<D2, Simplifier, OP2>, T, Self::OriginalD>
fn view_simplify<D2: Clone + 'a, Simplifier: for<'x> Fun<&'x D, D2> + Copy + 'a, OP2: Fun<(D2, D2), D2> + Copy + 'a>( self, simplifier: Simplifier, simplified_op: OP2, ) -> ImmFoldChainSliceStruct<'a, Self::IsReversed, Self::IsFlushLeft, Self::IsFlushRight, Self::Settings, <Self::Simplification as FoldSimplification<T, Self::OriginalD>>::Compose<D2, Simplifier, OP2>, T, Self::OriginalD>
Simplify this view. See Simplification. Read more
Source§fn view_simplify_with_shortcut<D2: Clone + 'a, Simplifier: for<'x> Fun<&'x D, D2> + Copy + 'a, OP2: Fun<(D2, D2), D2> + Copy + 'a, EmptyShortcut: Fun<(), D2> + Copy + 'a, DeltaShortcut: for<'x> Fun<&'x T, D2> + Copy + 'a>(
self,
simplifier: Simplifier,
simplified_op: OP2,
empty_shortcut: EmptyShortcut,
delta_shortcut: DeltaShortcut,
) -> ImmFoldChainSliceStruct<'a, Self::IsReversed, Self::IsFlushLeft, Self::IsFlushRight, Self::Settings, <Self::Simplification as FoldSimplification<T, Self::OriginalD>>::ComposeWithShortcut<D2, Simplifier, OP2, EmptyShortcut, DeltaShortcut>, T, Self::OriginalD>
fn view_simplify_with_shortcut<D2: Clone + 'a, Simplifier: for<'x> Fun<&'x D, D2> + Copy + 'a, OP2: Fun<(D2, D2), D2> + Copy + 'a, EmptyShortcut: Fun<(), D2> + Copy + 'a, DeltaShortcut: for<'x> Fun<&'x T, D2> + Copy + 'a>( self, simplifier: Simplifier, simplified_op: OP2, empty_shortcut: EmptyShortcut, delta_shortcut: DeltaShortcut, ) -> ImmFoldChainSliceStruct<'a, Self::IsReversed, Self::IsFlushLeft, Self::IsFlushRight, Self::Settings, <Self::Simplification as FoldSimplification<T, Self::OriginalD>>::ComposeWithShortcut<D2, Simplifier, OP2, EmptyShortcut, DeltaShortcut>, T, Self::OriginalD>
Simplify this view in a possibly more efficient way. See Simplification. Read more
Source§fn view_unsimplify(
self,
) -> ImmFoldChainSliceStruct<'a, Self::IsReversed, Self::IsFlushLeft, Self::IsFlushRight, Self::Settings, (), T, Self::OriginalD>
fn view_unsimplify( self, ) -> ImmFoldChainSliceStruct<'a, Self::IsReversed, Self::IsFlushLeft, Self::IsFlushRight, Self::Settings, (), T, Self::OriginalD>
Remove all simplifications that were applied to this view. See Simplification. Read more
Source§fn is_empty(&self) -> bool
fn is_empty(&self) -> bool
Returns true if this slice is empty (that is, when it contains 0 elements). Read more
Source§fn left<'b>(&'b self) -> Option<&'b T>where
'a: 'b,
fn left<'b>(&'b self) -> Option<&'b T>where
'a: 'b,
Get an immutable reference to this slice’s leftmost element, if this slice is not empty. Read more
Source§fn right<'b>(&'b self) -> Option<&'b T>where
'a: 'b,
fn right<'b>(&'b self) -> Option<&'b T>where
'a: 'b,
Get an immutable reference to this slice’s rightmost element, if this slice is not empty. Read more
Source§impl<'a, 'b, IsReversed: Bool, IsFlushLeft: Bool, IsFlushRight: Bool, T, D: Clone, Settings: FoldSettings<T, D> + 'a, Simplification: FoldSimplification<T, D> + 'a> IntoIterator for &'b MutFoldChainSliceStruct<'a, IsReversed, IsFlushLeft, IsFlushRight, T, D, Settings, Simplification>
impl<'a, 'b, IsReversed: Bool, IsFlushLeft: Bool, IsFlushRight: Bool, T, D: Clone, Settings: FoldSettings<T, D> + 'a, Simplification: FoldSimplification<T, D> + 'a> IntoIterator for &'b MutFoldChainSliceStruct<'a, IsReversed, IsFlushLeft, IsFlushRight, T, D, Settings, Simplification>
Source§impl<'a, IsReversed: Bool, IsFlushLeft: Bool, IsFlushRight: Bool, T, D: Clone, Settings: FoldSettings<T, D> + 'a, Simplification: FoldSimplification<T, D> + 'a> MutFoldChainSlice<'a, T, <Simplification as FoldSimplification<T, D>>::D2> for MutFoldChainSliceStruct<'a, IsReversed, IsFlushLeft, IsFlushRight, T, D, Settings, Simplification>
impl<'a, IsReversed: Bool, IsFlushLeft: Bool, IsFlushRight: Bool, T, D: Clone, Settings: FoldSettings<T, D> + 'a, Simplification: FoldSimplification<T, D> + 'a> MutFoldChainSlice<'a, T, <Simplification as FoldSimplification<T, D>>::D2> for MutFoldChainSliceStruct<'a, IsReversed, IsFlushLeft, IsFlushRight, T, D, Settings, Simplification>
Source§fn as_mut(
self,
) -> MutFoldChainSliceStruct<'a, Self::IsReversed, Self::IsFlushLeft, Self::IsFlushRight, T, Self::OriginalD, Self::Settings, Self::Simplification>
fn as_mut( self, ) -> MutFoldChainSliceStruct<'a, Self::IsReversed, Self::IsFlushLeft, Self::IsFlushRight, T, Self::OriginalD, Self::Settings, Self::Simplification>
Normalize this view’s type. This is mostly useless.
Source§fn borrow_mut<'b>(
&'b mut self,
) -> MutFoldChainSliceStruct<'b, IsReversed, IsFlushLeft, IsFlushRight, T, D, Settings, Simplification>
fn borrow_mut<'b>( &'b mut self, ) -> MutFoldChainSliceStruct<'b, IsReversed, IsFlushLeft, IsFlushRight, T, D, Settings, Simplification>
Mutably borrow this view.
Source§fn mut_view_drop_left_until(
self,
predicate: impl Fn(&Simplification::D2) -> bool,
) -> MutFoldChainSliceStruct<'a, IsReversed, <IsFlushLeft as Bool>::And<IsReversed>, <IsFlushRight as Bool>::And<<IsReversed as Bool>::Not>, T, D, Settings, Simplification>
fn mut_view_drop_left_until( self, predicate: impl Fn(&Simplification::D2) -> bool, ) -> MutFoldChainSliceStruct<'a, IsReversed, <IsFlushLeft as Bool>::And<IsReversed>, <IsFlushRight as Bool>::And<<IsReversed as Bool>::Not>, T, D, Settings, Simplification>
Contract this view on the left while the to-be-discarded range’s fold doesn’t meet
predicate. Read moreSource§fn mut_view_take_right_until(
self,
predicate: impl Fn(&Simplification::D2) -> bool,
) -> MutFoldChainSliceStruct<'a, IsReversed, <IsFlushLeft as Bool>::And<IsReversed>, <IsFlushRight as Bool>::And<<IsReversed as Bool>::Not>, T, D, Settings, Simplification>
fn mut_view_take_right_until( self, predicate: impl Fn(&Simplification::D2) -> bool, ) -> MutFoldChainSliceStruct<'a, IsReversed, <IsFlushLeft as Bool>::And<IsReversed>, <IsFlushRight as Bool>::And<<IsReversed as Bool>::Not>, T, D, Settings, Simplification>
Restrict this view to the longest range that starts on the right and whose fold doesn’t meet
predicate. Read moreSource§fn mut_view_reversed(
self,
) -> MutFoldChainSliceStruct<'a, <IsReversed as Bool>::Not, IsFlushLeft, IsFlushRight, T, D, Settings, Simplification>
fn mut_view_reversed( self, ) -> MutFoldChainSliceStruct<'a, <IsReversed as Bool>::Not, IsFlushLeft, IsFlushRight, T, D, Settings, Simplification>
Source§fn mut_view_with_simplification<NewSimplification: FoldSimplification<T, Simplification::D2>>(
self,
new_simplification: NewSimplification,
) -> MutFoldChainSliceStruct<'a, Self::IsReversed, Self::IsFlushLeft, Self::IsFlushRight, T, Self::OriginalD, Self::Settings, NewSimplification::ComposeAfterOther<Self::OriginalD, Self::Simplification>>
fn mut_view_with_simplification<NewSimplification: FoldSimplification<T, Simplification::D2>>( self, new_simplification: NewSimplification, ) -> MutFoldChainSliceStruct<'a, Self::IsReversed, Self::IsFlushLeft, Self::IsFlushRight, T, Self::OriginalD, Self::Settings, NewSimplification::ComposeAfterOther<Self::OriginalD, Self::Simplification>>
Compose this view’s current simplification with another one explicitly. See Simplification. Read more
Source§fn mut_view_unsimplify(
self,
) -> MutFoldChainSliceStruct<'a, IsReversed, IsFlushLeft, IsFlushRight, T, D, Settings, ()>
fn mut_view_unsimplify( self, ) -> MutFoldChainSliceStruct<'a, IsReversed, IsFlushLeft, IsFlushRight, T, D, Settings, ()>
Remove all simplifications that were applied to this view. See Simplification. Read more
Source§fn append_left(&mut self, value: T)
fn append_left(&mut self, value: T)
Append
value to the left of this slice.Source§fn set_left_or_err(&mut self, value: T) -> Result<T, T>
fn set_left_or_err(&mut self, value: T) -> Result<T, T>
Replace the leftmost element of this slice with
value. Read moreSource§fn update_left<R>(&mut self, f: impl FnOnce(Option<&mut T>) -> R) -> R
fn update_left<R>(&mut self, f: impl FnOnce(Option<&mut T>) -> R) -> R
Mutate the leftmost element of this slice via a closure, and return the result of the closure. Read more
Source§fn foreach_mut(&mut self, f: impl FnMut(&mut T))
fn foreach_mut(&mut self, f: impl FnMut(&mut T))
Run a closure on each of this slice’s elements, possibly mutating them, from left to right. Read more
Source§fn mut_view_drop_right_until(
self,
predicate: impl Fn(&D) -> bool,
) -> MutFoldChainSliceStruct<'a, <<Self::IsReversed as Bool>::Not as Bool>::Not, <Self::IsFlushLeft as Bool>::And<<Self::IsReversed as Bool>::Not>, <Self::IsFlushRight as Bool>::And<<<Self::IsReversed as Bool>::Not as Bool>::Not>, T, Self::OriginalD, Self::Settings, Self::Simplification>
fn mut_view_drop_right_until( self, predicate: impl Fn(&D) -> bool, ) -> MutFoldChainSliceStruct<'a, <<Self::IsReversed as Bool>::Not as Bool>::Not, <Self::IsFlushLeft as Bool>::And<<Self::IsReversed as Bool>::Not>, <Self::IsFlushRight as Bool>::And<<<Self::IsReversed as Bool>::Not as Bool>::Not>, T, Self::OriginalD, Self::Settings, Self::Simplification>
Contract this view on the right while the to-be-discarded range’s fold doesn’t meet
predicate. Read moreSource§fn mut_view_take_left_until(
self,
predicate: impl Fn(&D) -> bool,
) -> MutFoldChainSliceStruct<'a, <<Self::IsReversed as Bool>::Not as Bool>::Not, <Self::IsFlushLeft as Bool>::And<<Self::IsReversed as Bool>::Not>, <Self::IsFlushRight as Bool>::And<<<Self::IsReversed as Bool>::Not as Bool>::Not>, T, Self::OriginalD, Self::Settings, Self::Simplification>
fn mut_view_take_left_until( self, predicate: impl Fn(&D) -> bool, ) -> MutFoldChainSliceStruct<'a, <<Self::IsReversed as Bool>::Not as Bool>::Not, <Self::IsFlushLeft as Bool>::And<<Self::IsReversed as Bool>::Not>, <Self::IsFlushRight as Bool>::And<<<Self::IsReversed as Bool>::Not as Bool>::Not>, T, Self::OriginalD, Self::Settings, Self::Simplification>
Restrict this view to the longest range that starts on the left and whose fold doesn’t meet
predicate. Read moreSource§fn mut_view_drop<Predicate: Fn(&D) -> bool, Range: SingleEndedRange<Predicate>>(
self,
range: Range,
) -> <<Range as SingleEndedRange<Predicate>>::EndIsLeft as Bool>::IfElse<MutFoldChainSliceStruct<'a, <<<Self as FoldChainSlice<'a, T, D>>::IsReversed as Bool>::Not as Bool>::Not, <<Self as FoldChainSlice<'a, T, D>>::IsFlushLeft as Bool>::And<<<Self as FoldChainSlice<'a, T, D>>::IsReversed as Bool>::Not>, <<Self as FoldChainSlice<'a, T, D>>::IsFlushRight as Bool>::And<<<<Self as FoldChainSlice<'a, T, D>>::IsReversed as Bool>::Not as Bool>::Not>, T, <Self as FoldChainSlice<'a, T, D>>::OriginalD, <Self as FoldChainSlice<'a, T, D>>::Settings, <Self as FoldChainSlice<'a, T, D>>::Simplification>, MutFoldChainSliceStruct<'a, <Self as FoldChainSlice<'a, T, D>>::IsReversed, <<Self as FoldChainSlice<'a, T, D>>::IsFlushLeft as Bool>::And<<Self as FoldChainSlice<'a, T, D>>::IsReversed>, <<Self as FoldChainSlice<'a, T, D>>::IsFlushRight as Bool>::And<<<Self as FoldChainSlice<'a, T, D>>::IsReversed as Bool>::Not>, T, <Self as FoldChainSlice<'a, T, D>>::OriginalD, <Self as FoldChainSlice<'a, T, D>>::Settings, <Self as FoldChainSlice<'a, T, D>>::Simplification>>
fn mut_view_drop<Predicate: Fn(&D) -> bool, Range: SingleEndedRange<Predicate>>( self, range: Range, ) -> <<Range as SingleEndedRange<Predicate>>::EndIsLeft as Bool>::IfElse<MutFoldChainSliceStruct<'a, <<<Self as FoldChainSlice<'a, T, D>>::IsReversed as Bool>::Not as Bool>::Not, <<Self as FoldChainSlice<'a, T, D>>::IsFlushLeft as Bool>::And<<<Self as FoldChainSlice<'a, T, D>>::IsReversed as Bool>::Not>, <<Self as FoldChainSlice<'a, T, D>>::IsFlushRight as Bool>::And<<<<Self as FoldChainSlice<'a, T, D>>::IsReversed as Bool>::Not as Bool>::Not>, T, <Self as FoldChainSlice<'a, T, D>>::OriginalD, <Self as FoldChainSlice<'a, T, D>>::Settings, <Self as FoldChainSlice<'a, T, D>>::Simplification>, MutFoldChainSliceStruct<'a, <Self as FoldChainSlice<'a, T, D>>::IsReversed, <<Self as FoldChainSlice<'a, T, D>>::IsFlushLeft as Bool>::And<<Self as FoldChainSlice<'a, T, D>>::IsReversed>, <<Self as FoldChainSlice<'a, T, D>>::IsFlushRight as Bool>::And<<<Self as FoldChainSlice<'a, T, D>>::IsReversed as Bool>::Not>, T, <Self as FoldChainSlice<'a, T, D>>::OriginalD, <Self as FoldChainSlice<'a, T, D>>::Settings, <Self as FoldChainSlice<'a, T, D>>::Simplification>>
Source§fn mut_view_take<Predicate: Fn(&D) -> bool, Range: SingleEndedRange<Predicate>>(
self,
range: Range,
) -> <<Range as SingleEndedRange<Predicate>>::EndIsLeft as Bool>::IfElse<MutFoldChainSliceStruct<'a, <Self as FoldChainSlice<'a, T, D>>::IsReversed, <<Self as FoldChainSlice<'a, T, D>>::IsFlushLeft as Bool>::And<<Self as FoldChainSlice<'a, T, D>>::IsReversed>, <<Self as FoldChainSlice<'a, T, D>>::IsFlushRight as Bool>::And<<<Self as FoldChainSlice<'a, T, D>>::IsReversed as Bool>::Not>, T, <Self as FoldChainSlice<'a, T, D>>::OriginalD, <Self as FoldChainSlice<'a, T, D>>::Settings, <Self as FoldChainSlice<'a, T, D>>::Simplification>, MutFoldChainSliceStruct<'a, <<<Self as FoldChainSlice<'a, T, D>>::IsReversed as Bool>::Not as Bool>::Not, <<Self as FoldChainSlice<'a, T, D>>::IsFlushLeft as Bool>::And<<<Self as FoldChainSlice<'a, T, D>>::IsReversed as Bool>::Not>, <<Self as FoldChainSlice<'a, T, D>>::IsFlushRight as Bool>::And<<<<Self as FoldChainSlice<'a, T, D>>::IsReversed as Bool>::Not as Bool>::Not>, T, <Self as FoldChainSlice<'a, T, D>>::OriginalD, <Self as FoldChainSlice<'a, T, D>>::Settings, <Self as FoldChainSlice<'a, T, D>>::Simplification>>
fn mut_view_take<Predicate: Fn(&D) -> bool, Range: SingleEndedRange<Predicate>>( self, range: Range, ) -> <<Range as SingleEndedRange<Predicate>>::EndIsLeft as Bool>::IfElse<MutFoldChainSliceStruct<'a, <Self as FoldChainSlice<'a, T, D>>::IsReversed, <<Self as FoldChainSlice<'a, T, D>>::IsFlushLeft as Bool>::And<<Self as FoldChainSlice<'a, T, D>>::IsReversed>, <<Self as FoldChainSlice<'a, T, D>>::IsFlushRight as Bool>::And<<<Self as FoldChainSlice<'a, T, D>>::IsReversed as Bool>::Not>, T, <Self as FoldChainSlice<'a, T, D>>::OriginalD, <Self as FoldChainSlice<'a, T, D>>::Settings, <Self as FoldChainSlice<'a, T, D>>::Simplification>, MutFoldChainSliceStruct<'a, <<<Self as FoldChainSlice<'a, T, D>>::IsReversed as Bool>::Not as Bool>::Not, <<Self as FoldChainSlice<'a, T, D>>::IsFlushLeft as Bool>::And<<<Self as FoldChainSlice<'a, T, D>>::IsReversed as Bool>::Not>, <<Self as FoldChainSlice<'a, T, D>>::IsFlushRight as Bool>::And<<<<Self as FoldChainSlice<'a, T, D>>::IsReversed as Bool>::Not as Bool>::Not>, T, <Self as FoldChainSlice<'a, T, D>>::OriginalD, <Self as FoldChainSlice<'a, T, D>>::Settings, <Self as FoldChainSlice<'a, T, D>>::Simplification>>
Source§fn mut_view_simplify<D2: Clone + 'a, Simplifier: for<'x> Fun<&'x D, D2> + Copy + 'a, OP2: Fun<(D2, D2), D2> + Copy + 'a>(
self,
simplifier: Simplifier,
simplified_op: OP2,
) -> MutFoldChainSliceStruct<'a, Self::IsReversed, Self::IsFlushLeft, Self::IsFlushRight, T, Self::OriginalD, Self::Settings, <Self::Simplification as FoldSimplification<T, Self::OriginalD>>::Compose<D2, Simplifier, OP2>>
fn mut_view_simplify<D2: Clone + 'a, Simplifier: for<'x> Fun<&'x D, D2> + Copy + 'a, OP2: Fun<(D2, D2), D2> + Copy + 'a>( self, simplifier: Simplifier, simplified_op: OP2, ) -> MutFoldChainSliceStruct<'a, Self::IsReversed, Self::IsFlushLeft, Self::IsFlushRight, T, Self::OriginalD, Self::Settings, <Self::Simplification as FoldSimplification<T, Self::OriginalD>>::Compose<D2, Simplifier, OP2>>
Simplify this view. See Simplification. Read more
Source§fn mut_view_simplify_with_shortcut<D2: Clone + 'a, Simplifier: for<'x> Fun<&'x D, D2> + Copy + 'a, OP2: Fun<(D2, D2), D2> + Copy + 'a, EmptyShortcut: Fun<(), D2> + Copy + 'a, DeltaShortcut: for<'x> Fun<&'x T, D2> + Copy + 'a>(
self,
simplifier: Simplifier,
simplified_op: OP2,
empty_shortcut: EmptyShortcut,
delta_shortcut: DeltaShortcut,
) -> MutFoldChainSliceStruct<'a, Self::IsReversed, Self::IsFlushLeft, Self::IsFlushRight, T, Self::OriginalD, Self::Settings, <Self::Simplification as FoldSimplification<T, Self::OriginalD>>::ComposeWithShortcut<D2, Simplifier, OP2, EmptyShortcut, DeltaShortcut>>
fn mut_view_simplify_with_shortcut<D2: Clone + 'a, Simplifier: for<'x> Fun<&'x D, D2> + Copy + 'a, OP2: Fun<(D2, D2), D2> + Copy + 'a, EmptyShortcut: Fun<(), D2> + Copy + 'a, DeltaShortcut: for<'x> Fun<&'x T, D2> + Copy + 'a>( self, simplifier: Simplifier, simplified_op: OP2, empty_shortcut: EmptyShortcut, delta_shortcut: DeltaShortcut, ) -> MutFoldChainSliceStruct<'a, Self::IsReversed, Self::IsFlushLeft, Self::IsFlushRight, T, Self::OriginalD, Self::Settings, <Self::Simplification as FoldSimplification<T, Self::OriginalD>>::ComposeWithShortcut<D2, Simplifier, OP2, EmptyShortcut, DeltaShortcut>>
Simplify this view in a possibly more efficient way. See Simplification. Read more
Source§fn append_right(&mut self, value: T)
fn append_right(&mut self, value: T)
Append
value to the right of this slice.Source§fn set_right_or_err(&mut self, value: T) -> Result<T, T>
fn set_right_or_err(&mut self, value: T) -> Result<T, T>
Replace the rightmost element of this slice with
value. Read moreSource§fn set_left(&mut self, value: T) -> T
fn set_left(&mut self, value: T) -> T
Replace the leftmost element of this slice with
value and return its previous value. Read moreSource§fn set_right(&mut self, value: T) -> T
fn set_right(&mut self, value: T) -> T
Replace the rightmost element of this slice with
value and return its previous value. Read moreSource§fn update_right<R>(&mut self, f: impl FnOnce(Option<&mut T>) -> R) -> R
fn update_right<R>(&mut self, f: impl FnOnce(Option<&mut T>) -> R) -> R
Mutate the rightmost element of this slice via a closure, and return the result of the closure. Read more
Source§fn drain(self) -> Drain<'a, T, D, Self> ⓘ
fn drain(self) -> Drain<'a, T, D, Self> ⓘ
Convert this slice into an
Iterator that removes elements from the left as it emits them (or from the right with DoubleEndedIterator::next_back). Read moreSource§fn append_left_from_iter(&mut self, iter: impl Iterator<Item = T>)
fn append_left_from_iter(&mut self, iter: impl Iterator<Item = T>)
Append every element from an iterator to the left of this slice. Read more
Source§fn append_right_from_iter(&mut self, iter: impl Iterator<Item = T>)
fn append_right_from_iter(&mut self, iter: impl Iterator<Item = T>)
Append every element from an iterator to the right of this slice. Read more
impl<'a, IsReversed: Bool, IsFlushLeft: Bool, IsFlushRight: Bool, T: Send, D: Clone + Send, Settings: FoldSettings<T, D> + 'a + Send, Simplification: FoldSimplification<T, D> + 'a + Send> Send for MutFoldChainSliceStruct<'a, IsReversed, IsFlushLeft, IsFlushRight, T, D, Settings, Simplification>
impl<'a, IsReversed: Bool, IsFlushLeft: Bool, IsFlushRight: Bool, T: Sync, D: Clone + Sync, Settings: FoldSettings<T, D> + 'a + Sync, Simplification: FoldSimplification<T, D> + 'a + Sync> Sync for MutFoldChainSliceStruct<'a, IsReversed, IsFlushLeft, IsFlushRight, T, D, Settings, Simplification>
Auto Trait Implementations§
impl<'a, IsReversed, IsFlushLeft, IsFlushRight, T, D, Settings, Simplification> Freeze for MutFoldChainSliceStruct<'a, IsReversed, IsFlushLeft, IsFlushRight, T, D, Settings, Simplification>where
Simplification: Freeze,
<IsFlushLeft as Bool>::IfElse<<IsFlushRight as Bool>::IfElse<(), Result<&'a mut Option<NonNull<WAVLNode<T, D>>>, Option<NonNull<WAVLNode<T, D>>>>>, <IsFlushRight as Bool>::IfElse<Result<&'a mut Option<NonNull<WAVLNode<T, D>>>, Option<NonNull<WAVLNode<T, D>>>>, MutSliceEndpointsWhenBothNotFlush<'a, Option<NonNull<WAVLNode<T, D>>>>>>: Freeze,
impl<'a, IsReversed, IsFlushLeft, IsFlushRight, T, D, Settings, Simplification> RefUnwindSafe for MutFoldChainSliceStruct<'a, IsReversed, IsFlushLeft, IsFlushRight, T, D, Settings, Simplification>where
Simplification: RefUnwindSafe,
<IsFlushLeft as Bool>::IfElse<<IsFlushRight as Bool>::IfElse<(), Result<&'a mut Option<NonNull<WAVLNode<T, D>>>, Option<NonNull<WAVLNode<T, D>>>>>, <IsFlushRight as Bool>::IfElse<Result<&'a mut Option<NonNull<WAVLNode<T, D>>>, Option<NonNull<WAVLNode<T, D>>>>, MutSliceEndpointsWhenBothNotFlush<'a, Option<NonNull<WAVLNode<T, D>>>>>>: RefUnwindSafe,
IsReversed: RefUnwindSafe,
Settings: RefUnwindSafe,
T: RefUnwindSafe,
D: RefUnwindSafe,
impl<'a, IsReversed, IsFlushLeft, IsFlushRight, T, D, Settings, Simplification> Unpin for MutFoldChainSliceStruct<'a, IsReversed, IsFlushLeft, IsFlushRight, T, D, Settings, Simplification>where
Simplification: Unpin,
<IsFlushLeft as Bool>::IfElse<<IsFlushRight as Bool>::IfElse<(), Result<&'a mut Option<NonNull<WAVLNode<T, D>>>, Option<NonNull<WAVLNode<T, D>>>>>, <IsFlushRight as Bool>::IfElse<Result<&'a mut Option<NonNull<WAVLNode<T, D>>>, Option<NonNull<WAVLNode<T, D>>>>, MutSliceEndpointsWhenBothNotFlush<'a, Option<NonNull<WAVLNode<T, D>>>>>>: Unpin,
IsReversed: Unpin,
impl<'a, IsReversed, IsFlushLeft, IsFlushRight, T, D, Settings, Simplification> !UnwindSafe for MutFoldChainSliceStruct<'a, IsReversed, IsFlushLeft, IsFlushRight, T, D, Settings, Simplification>
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