#[repr(transparent)]
pub struct PreOrderChunkIterInner { /* private fields */ }

Implementations§

source§

impl PreOrderChunkIterInner

source

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.

source

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.

source

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.

source

pub fn borrow_owner<'_q>(&'_q self) -> &'_q RangeSet2<ChunkNum>

Borrows owner.

source

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.

source

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.

source

pub fn into_owner(self) -> RangeSet2<ChunkNum>

Consumes self and returns the the owner.

Trait Implementations§

source§

impl Drop for PreOrderChunkIterInner

source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.