[][src]Struct init_tree::InitializedTree

pub struct InitializedTree { /* fields omitted */ }

A collection of all the structures after they've been initialized. Call .take::<MyType>() on this to obtain the newly initialized structure.

Methods

impl InitializedTree[src]

pub fn take<T: 'static>(&mut self) -> Option<T>[src]

Removes the initialized structure from this tree and returns it.

pub fn take_all(self) -> impl Iterator<Item = (TypeId, Box<dyn Any>)>[src]

Returns an iterator of all initialized types.

pub fn take_by_type_id(&mut self, t: TypeId) -> Option<Box<dyn Any>>[src]

Removes the initialized structure from this tree and returns it. Prefer take() if possible, but this function is provided in case the type can't be determined at compile time.

pub fn take_cache(&mut self) -> Option<Cache>[src]

Return the cache from this initialization.

pub fn cache_was_correct(&self) -> bool[src]

Returns true if the cache loaded in was completely correct.

Trait Implementations

impl Default for InitializedTree[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Init for T where
    T: 'static + Default
[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.