::std::default::

Trait Default

pub trait Default {
fn hacky_default(self) -> Self;
}
Expand

Trait for types which have a constructible default value.

Caveats

Spade does not support static methods yet. As a temporary workaround, a regular method can be used instead, ignoring its self parameter, and an auxiliary function calls it on an undefined value. In this case, Default::hacky_default is such method and default is such auxiliary function.

Once Spade supports static methods, Default::hacky_default will be replaced by a static method Default::default.