Trait specs::storage::TryDefault [−][src]
pub trait TryDefault: Sized { fn try_default() -> Result<Self, String>; fn unwrap_default() -> Self { ... } }
Expand description
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>
[src]
fn try_default() -> Result<Self, String>
[src]Tries to create the default.
Provided methods
fn unwrap_default() -> Self
[src]
fn unwrap_default() -> Self
[src]Calls try_default
and panics on an error case.