[][src]Trait init_tree::Init

pub trait Init: Sized {
    fn init(
        initialized: &mut HashMap<TypeId, RefCell<Box<dyn Any>>>
    ) -> Option<Self>;
fn self_def() -> TypeInitDef;
fn deps_list() -> &'static [TypeInitDef];
fn deep_deps_list(t: &mut Vec<TypeInitDef>, call_depth: u32); }

The trait that must be implemented for a type before it can be used with the InitTree. Automatically implemented for Default types.

You are discouraged from implementing this manually, and should use the impl_init macro instead.

Required methods

fn init(
    initialized: &mut HashMap<TypeId, RefCell<Box<dyn Any>>>
) -> Option<Self>

fn self_def() -> TypeInitDef

fn deps_list() -> &'static [TypeInitDef]

fn deep_deps_list(t: &mut Vec<TypeInitDef>, call_depth: u32)

Loading content...

Implementors

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

Loading content...