Trait oxygengine_core::ecs::storage::TryDefault[][src]

pub trait TryDefault {
    pub fn try_default() -> Result<Self, String>;

    pub fn unwrap_default() -> Self { ... }
}

Tries to create a default value, returns an Err with the name of the storage and/or component if there’s no default.

Required methods

pub fn try_default() -> Result<Self, String>[src]

Tries to create the default.

Loading content...

Provided methods

pub fn unwrap_default() -> Self[src]

Calls try_default and panics on an error case.

Loading content...

Implementors

impl<T> TryDefault for T where
    T: Default
[src]

Loading content...