pub struct FoldChain<T, D: Clone, Settings: FoldSettings<T, D>> { /* private fields */ }Expand description
A base FoldChain. See FoldChain.
Implementations§
Source§impl<T, D: Clone, Settings: FoldSettings<T, D>> FoldChain<T, (usize, D), SettingsWithSize<Settings>>
impl<T, D: Clone, Settings: FoldSettings<T, D>> FoldChain<T, (usize, D), SettingsWithSize<Settings>>
Sourcepub fn as_fold_list(self) -> FoldList<T, D, Settings>
pub fn as_fold_list(self) -> FoldList<T, D, Settings>
Convert a FoldChain that keeps track of size to a FoldList.
Source§impl<T, D: Clone, OP: Fn(D, D) -> D + Copy, DeltaOf: Fn(&T) -> D + Copy, Empty: Fn() -> D + Copy> FoldChain<T, D, FoldSettingsStruct<T, D, TupleFun<OP>, DeltaOf, EmptyFn<Empty>>>
impl<T, D: Clone, OP: Fn(D, D) -> D + Copy, DeltaOf: Fn(&T) -> D + Copy, Empty: Fn() -> D + Copy> FoldChain<T, D, FoldSettingsStruct<T, D, TupleFun<OP>, DeltaOf, EmptyFn<Empty>>>
Source§impl<T, D: Clone, OP: Fn(D, D) -> D + Copy, DeltaOf: Fn(&T) -> D + Copy> FoldChain<T, Option<D>, FoldSettingsStruct<T, Option<D>, OptOpFun<TupleFun<OP>>, SomeFun<DeltaOf>, NoneFun>>
impl<T, D: Clone, OP: Fn(D, D) -> D + Copy, DeltaOf: Fn(&T) -> D + Copy> FoldChain<T, Option<D>, FoldSettingsStruct<T, Option<D>, OptOpFun<TupleFun<OP>>, SomeFun<DeltaOf>, NoneFun>>
Sourcepub fn new_with_opt(op: OP, delta_of: DeltaOf) -> Self
pub fn new_with_opt(op: OP, delta_of: DeltaOf) -> Self
Sourcepub fn new_with_opt_from_iter(
op: OP,
delta_of: DeltaOf,
iter: impl Iterator<Item = T>,
) -> Self
pub fn new_with_opt_from_iter( op: OP, delta_of: DeltaOf, iter: impl Iterator<Item = T>, ) -> Self
Source§impl<T, D: Clone, Settings: FoldSettings<T, D>> FoldChain<T, D, Settings>
impl<T, D: Clone, Settings: FoldSettings<T, D>> FoldChain<T, D, Settings>
Sourcepub fn from_settings(settings: Settings) -> Self
pub fn from_settings(settings: Settings) -> Self
Create a new empty FoldChain, with the specified Settings.
Sourcepub fn get_current_simplification(&self)
pub fn get_current_simplification(&self)
An alias of get_current_simplification.
Sourcepub fn get_settings(&self) -> Settings
pub fn get_settings(&self) -> Settings
An alias of get_settings.
Sourcepub fn as_imm(
&self,
) -> ImmFoldChainSliceStruct<'_, False, True, True, Settings, (), T, D>
pub fn as_imm( &self, ) -> ImmFoldChainSliceStruct<'_, False, True, True, Settings, (), T, D>
An alias of as_imm.
Sourcepub fn borrow(
&self,
) -> ImmFoldChainSliceStruct<'_, False, True, True, Settings, (), T, D>
pub fn borrow( &self, ) -> ImmFoldChainSliceStruct<'_, False, True, True, Settings, (), T, D>
An alias of borrow.
Sourcepub fn view_drop_left_until(
&self,
predicate: impl Fn(&D) -> bool,
) -> ImmFoldChainSliceStruct<'_, False, False, True, Settings, (), T, D>
pub fn view_drop_left_until( &self, predicate: impl Fn(&D) -> bool, ) -> ImmFoldChainSliceStruct<'_, False, False, True, Settings, (), T, D>
An alias of view_drop_left_until.
Sourcepub fn view_take_right_until(
&self,
predicate: impl Fn(&D) -> bool,
) -> ImmFoldChainSliceStruct<'_, False, False, True, Settings, (), T, D>
pub fn view_take_right_until( &self, predicate: impl Fn(&D) -> bool, ) -> ImmFoldChainSliceStruct<'_, False, False, True, Settings, (), T, D>
An alias of view_take_right_until.
Sourcepub fn view_drop_right_until(
&self,
predicate: impl Fn(&D) -> bool,
) -> ImmFoldChainSliceStruct<'_, False, True, False, Settings, (), T, D>
pub fn view_drop_right_until( &self, predicate: impl Fn(&D) -> bool, ) -> ImmFoldChainSliceStruct<'_, False, True, False, Settings, (), T, D>
An alias of view_drop_right_until.
Sourcepub fn view_take_left_until(
&self,
predicate: impl Fn(&D) -> bool,
) -> ImmFoldChainSliceStruct<'_, False, True, False, Settings, (), T, D>
pub fn view_take_left_until( &self, predicate: impl Fn(&D) -> bool, ) -> ImmFoldChainSliceStruct<'_, False, True, False, Settings, (), T, D>
An alias of view_take_left_until.
Sourcepub fn view_drop<Predicate: Fn(&D) -> bool, Range: SingleEndedRange<Predicate>>(
&self,
range: Range,
) -> <<Range as SingleEndedRange<Predicate>>::EndIsLeft as Bool>::IfElse<ImmFoldChainSliceStruct<'_, False, True, False, Settings, (), T, D>, ImmFoldChainSliceStruct<'_, False, False, True, Settings, (), T, D>>
pub fn view_drop<Predicate: Fn(&D) -> bool, Range: SingleEndedRange<Predicate>>( &self, range: Range, ) -> <<Range as SingleEndedRange<Predicate>>::EndIsLeft as Bool>::IfElse<ImmFoldChainSliceStruct<'_, False, True, False, Settings, (), T, D>, ImmFoldChainSliceStruct<'_, False, False, True, Settings, (), T, D>>
An alias of view_drop.
Sourcepub fn view_take<Predicate: Fn(&D) -> bool, Range: SingleEndedRange<Predicate>>(
&self,
range: Range,
) -> <<Range as SingleEndedRange<Predicate>>::EndIsLeft as Bool>::IfElse<ImmFoldChainSliceStruct<'_, False, False, True, Settings, (), T, D>, ImmFoldChainSliceStruct<'_, False, True, False, Settings, (), T, D>>
pub fn view_take<Predicate: Fn(&D) -> bool, Range: SingleEndedRange<Predicate>>( &self, range: Range, ) -> <<Range as SingleEndedRange<Predicate>>::EndIsLeft as Bool>::IfElse<ImmFoldChainSliceStruct<'_, False, False, True, Settings, (), T, D>, ImmFoldChainSliceStruct<'_, False, True, False, Settings, (), T, D>>
An alias of view_take.
Sourcepub fn view_reversed(
&self,
) -> ImmFoldChainSliceStruct<'_, True, True, True, Settings, (), T, D>
pub fn view_reversed( &self, ) -> ImmFoldChainSliceStruct<'_, True, True, True, Settings, (), T, D>
An alias of view_reversed.
Sourcepub fn view_with_simplification<NewSimplification: FoldSimplification<T, D>>(
&self,
new_simplification: NewSimplification,
) -> ImmFoldChainSliceStruct<'_, False, True, True, Settings, <NewSimplification as FoldSimplification<T, D>>::ComposeAfterOther<D, ()>, T, D>
pub fn view_with_simplification<NewSimplification: FoldSimplification<T, D>>( &self, new_simplification: NewSimplification, ) -> ImmFoldChainSliceStruct<'_, False, True, True, Settings, <NewSimplification as FoldSimplification<T, D>>::ComposeAfterOther<D, ()>, T, D>
An alias of view_with_simplification.
Sourcepub fn view_simplify<'a, D2: Clone + 'a, Simplifier: for<'x> Fun<&'x D, D2> + Copy + 'a, OP2: Fun<(D2, D2), D2> + Copy + 'a>(
&'a self,
simplifier: Simplifier,
simplified_op: OP2,
) -> ImmFoldChainSliceStruct<'a, False, True, True, Settings, SimplificationWithoutShortcut<T, D, D2, Simplifier, OP2>, T, D>
pub fn view_simplify<'a, D2: Clone + 'a, Simplifier: for<'x> Fun<&'x D, D2> + Copy + 'a, OP2: Fun<(D2, D2), D2> + Copy + 'a>( &'a self, simplifier: Simplifier, simplified_op: OP2, ) -> ImmFoldChainSliceStruct<'a, False, True, True, Settings, SimplificationWithoutShortcut<T, D, D2, Simplifier, OP2>, T, D>
An alias of view_simplify.
Sourcepub fn view_simplify_with_shortcut<'a, 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>(
&'a self,
simplifier: Simplifier,
simplified_op: OP2,
empty_shortcut: EmptyShortcut,
delta_shortcut: DeltaShortcut,
) -> ImmFoldChainSliceStruct<'a, False, True, True, Settings, SimplificationWithShortcut<T, D, D2, Simplifier, OP2, EmptyShortcut, DeltaShortcut>, T, D>
pub fn view_simplify_with_shortcut<'a, 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>( &'a self, simplifier: Simplifier, simplified_op: OP2, empty_shortcut: EmptyShortcut, delta_shortcut: DeltaShortcut, ) -> ImmFoldChainSliceStruct<'a, False, True, True, Settings, SimplificationWithShortcut<T, D, D2, Simplifier, OP2, EmptyShortcut, DeltaShortcut>, T, D>
An alias of view_simplify_with_shortcut.
Sourcepub fn view_unsimplify(
&self,
) -> ImmFoldChainSliceStruct<'_, False, True, True, Settings, (), T, D>
pub fn view_unsimplify( &self, ) -> ImmFoldChainSliceStruct<'_, False, True, True, Settings, (), T, D>
An alias of view_unsimplify.
Sourcepub fn as_mut(
&mut self,
) -> MutFoldChainSliceStruct<'_, False, True, True, T, D, Settings, ()>
pub fn as_mut( &mut self, ) -> MutFoldChainSliceStruct<'_, False, True, True, T, D, Settings, ()>
An alias of as_mut.
Sourcepub fn borrow_mut(
&mut self,
) -> MutFoldChainSliceStruct<'_, False, True, True, T, D, Settings, ()>
pub fn borrow_mut( &mut self, ) -> MutFoldChainSliceStruct<'_, False, True, True, T, D, Settings, ()>
An alias of borrow_mut.
Sourcepub fn mut_view_drop_left_until(
&mut self,
predicate: impl Fn(&D) -> bool,
) -> MutFoldChainSliceStruct<'_, False, False, True, T, D, Settings, ()>
pub fn mut_view_drop_left_until( &mut self, predicate: impl Fn(&D) -> bool, ) -> MutFoldChainSliceStruct<'_, False, False, True, T, D, Settings, ()>
An alias of mut_view_drop_left_until.
Sourcepub fn mut_view_take_right_until(
&mut self,
predicate: impl Fn(&D) -> bool,
) -> MutFoldChainSliceStruct<'_, False, False, True, T, D, Settings, ()>
pub fn mut_view_take_right_until( &mut self, predicate: impl Fn(&D) -> bool, ) -> MutFoldChainSliceStruct<'_, False, False, True, T, D, Settings, ()>
An alias of mut_view_take_right_until.
Sourcepub fn mut_view_drop_right_until(
&mut self,
predicate: impl Fn(&D) -> bool,
) -> MutFoldChainSliceStruct<'_, False, True, False, T, D, Settings, ()>
pub fn mut_view_drop_right_until( &mut self, predicate: impl Fn(&D) -> bool, ) -> MutFoldChainSliceStruct<'_, False, True, False, T, D, Settings, ()>
An alias of mut_view_drop_right_until.
Sourcepub fn mut_view_take_left_until(
&mut self,
predicate: impl Fn(&D) -> bool,
) -> MutFoldChainSliceStruct<'_, False, True, False, T, D, Settings, ()>
pub fn mut_view_take_left_until( &mut self, predicate: impl Fn(&D) -> bool, ) -> MutFoldChainSliceStruct<'_, False, True, False, T, D, Settings, ()>
An alias of mut_view_take_left_until.
Sourcepub fn mut_view_drop<Predicate: Fn(&D) -> bool, Range: SingleEndedRange<Predicate>>(
&mut self,
range: Range,
) -> <<Range as SingleEndedRange<Predicate>>::EndIsLeft as Bool>::IfElse<MutFoldChainSliceStruct<'_, False, True, False, T, D, Settings, ()>, MutFoldChainSliceStruct<'_, False, False, True, T, D, Settings, ()>>
pub fn mut_view_drop<Predicate: Fn(&D) -> bool, Range: SingleEndedRange<Predicate>>( &mut self, range: Range, ) -> <<Range as SingleEndedRange<Predicate>>::EndIsLeft as Bool>::IfElse<MutFoldChainSliceStruct<'_, False, True, False, T, D, Settings, ()>, MutFoldChainSliceStruct<'_, False, False, True, T, D, Settings, ()>>
An alias of mut_view_drop.
Sourcepub fn mut_view_take<Predicate: Fn(&D) -> bool, Range: SingleEndedRange<Predicate>>(
&mut self,
range: Range,
) -> <<Range as SingleEndedRange<Predicate>>::EndIsLeft as Bool>::IfElse<MutFoldChainSliceStruct<'_, False, False, True, T, D, Settings, ()>, MutFoldChainSliceStruct<'_, False, True, False, T, D, Settings, ()>>
pub fn mut_view_take<Predicate: Fn(&D) -> bool, Range: SingleEndedRange<Predicate>>( &mut self, range: Range, ) -> <<Range as SingleEndedRange<Predicate>>::EndIsLeft as Bool>::IfElse<MutFoldChainSliceStruct<'_, False, False, True, T, D, Settings, ()>, MutFoldChainSliceStruct<'_, False, True, False, T, D, Settings, ()>>
An alias of mut_view_take.
Sourcepub fn mut_view_reversed(
&mut self,
) -> MutFoldChainSliceStruct<'_, True, True, True, T, D, Settings, ()>
pub fn mut_view_reversed( &mut self, ) -> MutFoldChainSliceStruct<'_, True, True, True, T, D, Settings, ()>
An alias of mut_view_reversed.
Sourcepub fn mut_view_with_simplification<NewSimplification: FoldSimplification<T, D>>(
&mut self,
new_simplification: NewSimplification,
) -> MutFoldChainSliceStruct<'_, False, True, True, T, D, Settings, <NewSimplification as FoldSimplification<T, D>>::ComposeAfterOther<D, ()>>
pub fn mut_view_with_simplification<NewSimplification: FoldSimplification<T, D>>( &mut self, new_simplification: NewSimplification, ) -> MutFoldChainSliceStruct<'_, False, True, True, T, D, Settings, <NewSimplification as FoldSimplification<T, D>>::ComposeAfterOther<D, ()>>
An alias of mut_view_with_simplification.
Sourcepub fn mut_view_simplify<'a, D2: Clone + 'a, Simplifier: for<'x> Fun<&'x D, D2> + Copy + 'a, OP2: Fun<(D2, D2), D2> + Copy + 'a>(
&'a mut self,
simplifier: Simplifier,
simplified_op: OP2,
) -> MutFoldChainSliceStruct<'a, False, True, True, T, D, Settings, SimplificationWithoutShortcut<T, D, D2, Simplifier, OP2>>
pub fn mut_view_simplify<'a, D2: Clone + 'a, Simplifier: for<'x> Fun<&'x D, D2> + Copy + 'a, OP2: Fun<(D2, D2), D2> + Copy + 'a>( &'a mut self, simplifier: Simplifier, simplified_op: OP2, ) -> MutFoldChainSliceStruct<'a, False, True, True, T, D, Settings, SimplificationWithoutShortcut<T, D, D2, Simplifier, OP2>>
An alias of mut_view_simplify.
Sourcepub fn mut_view_simplify_with_shortcut<'a, 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>(
&'a mut self,
simplifier: Simplifier,
simplified_op: OP2,
empty_shortcut: EmptyShortcut,
delta_shortcut: DeltaShortcut,
) -> MutFoldChainSliceStruct<'a, False, True, True, T, D, Settings, SimplificationWithShortcut<T, D, D2, Simplifier, OP2, EmptyShortcut, DeltaShortcut>>
pub fn mut_view_simplify_with_shortcut<'a, 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>( &'a mut self, simplifier: Simplifier, simplified_op: OP2, empty_shortcut: EmptyShortcut, delta_shortcut: DeltaShortcut, ) -> MutFoldChainSliceStruct<'a, False, True, True, T, D, Settings, SimplificationWithShortcut<T, D, D2, Simplifier, OP2, EmptyShortcut, DeltaShortcut>>
An alias of mut_view_simplify_with_shortcut.
Sourcepub fn mut_view_unsimplify(
&mut self,
) -> MutFoldChainSliceStruct<'_, False, True, True, T, D, Settings, ()>
pub fn mut_view_unsimplify( &mut self, ) -> MutFoldChainSliceStruct<'_, False, True, True, T, D, Settings, ()>
An alias of mut_view_unsimplify.
Sourcepub fn append_left(&mut self, value: T)
pub fn append_left(&mut self, value: T)
An alias of append_left.
Sourcepub fn append_right(&mut self, value: T)
pub fn append_right(&mut self, value: T)
An alias of append_right.
Sourcepub fn set_left_or_err(&mut self, value: T) -> Result<T, T>
pub fn set_left_or_err(&mut self, value: T) -> Result<T, T>
An alias of set_left_or_err.
Sourcepub fn set_right_or_err(&mut self, value: T) -> Result<T, T>
pub fn set_right_or_err(&mut self, value: T) -> Result<T, T>
An alias of set_right_or_err.
Sourcepub fn update_left<R>(&mut self, f: impl FnOnce(Option<&mut T>) -> R) -> R
pub fn update_left<R>(&mut self, f: impl FnOnce(Option<&mut T>) -> R) -> R
An alias of update_left.
Sourcepub fn update_right<R>(&mut self, f: impl FnOnce(Option<&mut T>) -> R) -> R
pub fn update_right<R>(&mut self, f: impl FnOnce(Option<&mut T>) -> R) -> R
An alias of update_right.
Sourcepub fn foreach_mut(&mut self, f: impl FnMut(&mut T))
pub fn foreach_mut(&mut self, f: impl FnMut(&mut T))
An alias of foreach_mut.
Sourcepub fn append_all_right(&mut self, chain: FoldChain<T, D, Settings>)
pub fn append_all_right(&mut self, chain: FoldChain<T, D, Settings>)
An alias of append_all_right.
Sourcepub fn append_all_left(&mut self, chain: FoldChain<T, D, Settings>)
pub fn append_all_left(&mut self, chain: FoldChain<T, D, Settings>)
An alias of append_all_left.
Sourcepub fn append_left_from_iter(&mut self, iter: impl Iterator<Item = T>)
pub fn append_left_from_iter(&mut self, iter: impl Iterator<Item = T>)
An alias of append_left_from_iter.
Sourcepub fn append_right_from_iter(&mut self, iter: impl Iterator<Item = T>)
pub fn append_right_from_iter(&mut self, iter: impl Iterator<Item = T>)
An alias of append_right_from_iter.
Trait Implementations§
Source§impl<'a, T, D: Clone, Settings: FoldSettings<T, D>> FoldChainSlice<'a, T, D> for &'a FoldChain<T, D, Settings>
impl<'a, T, D: Clone, Settings: FoldSettings<T, D>> FoldChainSlice<'a, T, D> for &'a FoldChain<T, D, Settings>
Source§type IsReversed = False
type IsReversed = False
Source§type IsFlushLeft = True
type IsFlushLeft = True
FoldChain’s left endpointSource§type IsFlushRight = True
type IsFlushRight = True
FoldChain’s right endpointSource§type Simplification = ()
type Simplification = ()
Source§fn get_current_simplification(&self) -> Self::Simplification
fn get_current_simplification(&self) -> Self::Simplification
() 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Source§fn is_empty(&self) -> bool
fn is_empty(&self) -> bool
Source§fn left<'b>(&'b self) -> Option<&'b T>where
'a: 'b,
fn left<'b>(&'b self) -> Option<&'b T>where
'a: 'b,
Source§fn right<'b>(&'b self) -> Option<&'b T>where
'a: 'b,
fn right<'b>(&'b self) -> Option<&'b T>where
'a: 'b,
Source§impl<'a, T, D: Clone, Settings: FoldSettings<T, D>> FoldChainSlice<'a, T, D> for &'a mut FoldChain<T, D, Settings>
impl<'a, T, D: Clone, Settings: FoldSettings<T, D>> FoldChainSlice<'a, T, D> for &'a mut FoldChain<T, D, Settings>
Source§type IsReversed = False
type IsReversed = False
Source§type IsFlushLeft = True
type IsFlushLeft = True
FoldChain’s left endpointSource§type IsFlushRight = True
type IsFlushRight = True
FoldChain’s right endpointSource§type Simplification = ()
type Simplification = ()
Source§fn get_current_simplification(&self) -> Self::Simplification
fn get_current_simplification(&self) -> Self::Simplification
() 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Source§fn is_empty(&self) -> bool
fn is_empty(&self) -> bool
Source§fn left<'b>(&'b self) -> Option<&'b T>where
'a: 'b,
fn left<'b>(&'b self) -> Option<&'b T>where
'a: 'b,
Source§fn right<'b>(&'b self) -> Option<&'b T>where
'a: 'b,
fn right<'b>(&'b self) -> Option<&'b T>where
'a: 'b,
Source§impl<'a, T, D: Clone, Settings: FoldSettings<T, D>> IntoIterator for &'a FoldChain<T, D, Settings>
impl<'a, T, D: Clone, Settings: FoldSettings<T, D>> IntoIterator for &'a FoldChain<T, D, Settings>
Source§impl<T, D: Clone, Settings: FoldSettings<T, D>> IntoIterator for FoldChain<T, D, Settings>
impl<T, D: Clone, Settings: FoldSettings<T, D>> IntoIterator for FoldChain<T, D, Settings>
Source§impl<'a, T, D: Clone, Settings: FoldSettings<T, D>> MutFoldChainSlice<'a, T, D> for &'a mut FoldChain<T, D, Settings>
impl<'a, T, D: Clone, Settings: FoldSettings<T, D>> MutFoldChainSlice<'a, T, D> for &'a mut FoldChain<T, D, Settings>
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>
Source§fn borrow_mut<'b>(
&'b mut self,
) -> MutFoldChainSliceStruct<'b, Self::IsReversed, Self::IsFlushLeft, Self::IsFlushRight, T, Self::OriginalD, Self::Settings, Self::Simplification>
fn borrow_mut<'b>( &'b mut self, ) -> MutFoldChainSliceStruct<'b, Self::IsReversed, Self::IsFlushLeft, Self::IsFlushRight, T, Self::OriginalD, Self::Settings, Self::Simplification>
Source§fn mut_view_drop_left_until(
self,
predicate: impl Fn(&D) -> bool,
) -> MutFoldChainSliceStruct<'a, Self::IsReversed, <Self::IsFlushLeft as Bool>::And<Self::IsReversed>, <Self::IsFlushRight as Bool>::And<<Self::IsReversed as Bool>::Not>, T, Self::OriginalD, Self::Settings, Self::Simplification>
fn mut_view_drop_left_until( self, predicate: impl Fn(&D) -> bool, ) -> MutFoldChainSliceStruct<'a, Self::IsReversed, <Self::IsFlushLeft as Bool>::And<Self::IsReversed>, <Self::IsFlushRight as Bool>::And<<Self::IsReversed as Bool>::Not>, T, Self::OriginalD, Self::Settings, Self::Simplification>
predicate. Read moreSource§fn mut_view_take_right_until(
self,
predicate: impl Fn(&D) -> bool,
) -> MutFoldChainSliceStruct<'a, Self::IsReversed, <Self::IsFlushLeft as Bool>::And<Self::IsReversed>, <Self::IsFlushRight as Bool>::And<<Self::IsReversed as Bool>::Not>, T, Self::OriginalD, Self::Settings, Self::Simplification>
fn mut_view_take_right_until( self, predicate: impl Fn(&D) -> bool, ) -> MutFoldChainSliceStruct<'a, Self::IsReversed, <Self::IsFlushLeft as Bool>::And<Self::IsReversed>, <Self::IsFlushRight as Bool>::And<<Self::IsReversed as Bool>::Not>, T, Self::OriginalD, Self::Settings, Self::Simplification>
predicate. Read moreSource§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>
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>
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_reversed(
self,
) -> MutFoldChainSliceStruct<'a, <Self::IsReversed as Bool>::Not, Self::IsFlushLeft, Self::IsFlushRight, T, Self::OriginalD, Self::Settings, Self::Simplification>
fn mut_view_reversed( self, ) -> MutFoldChainSliceStruct<'a, <Self::IsReversed as Bool>::Not, Self::IsFlushLeft, Self::IsFlushRight, T, Self::OriginalD, Self::Settings, Self::Simplification>
Source§fn mut_view_with_simplification<NewSimplification: FoldSimplification<T, D>>(
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, D>>( self, new_simplification: NewSimplification, ) -> MutFoldChainSliceStruct<'a, Self::IsReversed, Self::IsFlushLeft, Self::IsFlushRight, T, Self::OriginalD, Self::Settings, NewSimplification::ComposeAfterOther<Self::OriginalD, Self::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>>
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>>
Source§fn mut_view_unsimplify(
self,
) -> MutFoldChainSliceStruct<'a, Self::IsReversed, Self::IsFlushLeft, Self::IsFlushRight, T, Self::OriginalD, Self::Settings, ()>
fn mut_view_unsimplify( self, ) -> MutFoldChainSliceStruct<'a, Self::IsReversed, Self::IsFlushLeft, Self::IsFlushRight, T, Self::OriginalD, Self::Settings, ()>
Source§fn append_left(&mut self, value: T)
fn append_left(&mut self, value: T)
value to the left of this slice.Source§fn append_right(&mut self, value: T)
fn append_right(&mut self, value: T)
value to the right 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>
value. Read moreSource§fn set_right_or_err(&mut self, value: T) -> Result<T, T>
fn set_right_or_err(&mut self, value: T) -> Result<T, T>
value. Read moreSource§fn set_left(&mut self, value: T) -> T
fn set_left(&mut self, value: T) -> T
value and return its previous value. Read moreSource§fn set_right(&mut self, value: T) -> T
fn set_right(&mut self, value: T) -> T
value and return its previous 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
Source§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
Source§fn foreach_mut(&mut self, f: impl FnMut(&mut T))
fn foreach_mut(&mut self, f: impl FnMut(&mut T))
Source§fn drain(self) -> Drain<'a, T, D, Self> ⓘ
fn drain(self) -> Drain<'a, T, D, Self> ⓘ
Iterator that removes elements from the left as it emits them (or from the right with DoubleEndedIterator::next_back). Read more