Trait DefaultFrom

pub trait DefaultFrom<T> {
    // Required method
    fn default_from(value: &T) -> Self;
}
Available on crate feature chili only.
Expand description

Used to construct initial (empty) AuxStorage variants.

Required Methods§

fn default_from(value: &T) -> Self

Constructs the Type in question from a given value. This is typically a zero value. If it can be constructed from the num::Zero trait, this method is not required and cellular_raza will determine the initial zero-value correctly. For other types (ie. dynamically-sized ones) additional entries may be necessary.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

§

impl<Pos, Vel, For, const N: usize> DefaultFrom<For> for AuxStorageMechanics<Pos, Vel, For, N>
where For: Clone,

§

impl<Ri> DefaultFrom<Ri> for AuxStorageReactions<Ri>
where Ri: Clone,

§

impl<Ri, const N: usize> DefaultFrom<Ri> for AuxStorageReactionsContact<Ri, N>
where Ri: Clone,