Trait amethyst::ecs::storage::TryDefault [−]
pub trait TryDefault {
fn try_default() -> Result<Self, String>;
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
fn try_default() -> Result<Self, String>
Tries to create the default.
Provided Methods
fn unwrap_default() -> Self
Calls try_default and panics on an error case.
Implementors
impl<T> TryDefault for T where
T: Default,