Struct bao_tree::iter::PreOrderChunkIterInner
source · #[repr(transparent)]pub struct PreOrderChunkIterInner { /* private fields */ }Implementations§
source§impl PreOrderChunkIterInner
impl PreOrderChunkIterInner
sourcepub fn new(
owner: RangeSet2<ChunkNum>,
dependent_builder: impl for<'_q> FnOnce(&'_q RangeSet2<ChunkNum>) -> PreOrderChunkIterRef<'_q>
) -> Self
pub fn new( owner: RangeSet2<ChunkNum>, dependent_builder: impl for<'_q> FnOnce(&'_q RangeSet2<ChunkNum>) -> PreOrderChunkIterRef<'_q> ) -> Self
Constructs a new self-referential struct.
The provided owner will be moved into a heap allocated box.
Followed by construction of the dependent value, by calling
dependent_builder with a shared reference to the owner that
remains valid for the lifetime of the constructed struct.
sourcepub fn try_new<Err>(
owner: RangeSet2<ChunkNum>,
dependent_builder: impl for<'_q> FnOnce(&'_q RangeSet2<ChunkNum>) -> Result<PreOrderChunkIterRef<'_q>, Err>
) -> Result<Self, Err>
pub fn try_new<Err>( owner: RangeSet2<ChunkNum>, dependent_builder: impl for<'_q> FnOnce(&'_q RangeSet2<ChunkNum>) -> Result<PreOrderChunkIterRef<'_q>, Err> ) -> Result<Self, Err>
Tries to create a new structure with a given dependent builder.
Consumes owner on error.
sourcepub fn try_new_or_recover<Err>(
owner: RangeSet2<ChunkNum>,
dependent_builder: impl for<'_q> FnOnce(&'_q RangeSet2<ChunkNum>) -> Result<PreOrderChunkIterRef<'_q>, Err>
) -> Result<Self, (RangeSet2<ChunkNum>, Err)>
pub fn try_new_or_recover<Err>( owner: RangeSet2<ChunkNum>, dependent_builder: impl for<'_q> FnOnce(&'_q RangeSet2<ChunkNum>) -> Result<PreOrderChunkIterRef<'_q>, Err> ) -> Result<Self, (RangeSet2<ChunkNum>, Err)>
Tries to create a new structure with a given dependent builder.
Returns owner on error.
sourcepub fn borrow_owner<'_q>(&'_q self) -> &'_q RangeSet2<ChunkNum>
pub fn borrow_owner<'_q>(&'_q self) -> &'_q RangeSet2<ChunkNum>
Borrows owner.
sourcepub fn with_dependent<'outer_fn, Ret>(
&'outer_fn self,
func: impl for<'_q> FnOnce(&'_q RangeSet2<ChunkNum>, &'outer_fn PreOrderChunkIterRef<'_q>) -> Ret
) -> Ret
pub fn with_dependent<'outer_fn, Ret>( &'outer_fn self, func: impl for<'_q> FnOnce(&'_q RangeSet2<ChunkNum>, &'outer_fn PreOrderChunkIterRef<'_q>) -> Ret ) -> Ret
Calls given closure func with a shared reference to dependent.
sourcepub fn with_dependent_mut<'outer_fn, Ret>(
&'outer_fn mut self,
func: impl for<'_q> FnOnce(&'_q RangeSet2<ChunkNum>, &'outer_fn mut PreOrderChunkIterRef<'_q>) -> Ret
) -> Ret
pub fn with_dependent_mut<'outer_fn, Ret>( &'outer_fn mut self, func: impl for<'_q> FnOnce(&'_q RangeSet2<ChunkNum>, &'outer_fn mut PreOrderChunkIterRef<'_q>) -> Ret ) -> Ret
Calls given closure func with an unique reference to dependent.
sourcepub fn into_owner(self) -> RangeSet2<ChunkNum>
pub fn into_owner(self) -> RangeSet2<ChunkNum>
Consumes self and returns the the owner.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for PreOrderChunkIterInner
impl Send for PreOrderChunkIterInner
impl Sync for PreOrderChunkIterInner
impl Unpin for PreOrderChunkIterInner
impl UnwindSafe for PreOrderChunkIterInner
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