pub trait DefaultValue {
// Required method
fn default_value(&self) -> Value;
}Required Methods§
Sourcefn default_value(&self) -> Value
fn default_value(&self) -> Value
Returns the default Value for a given Kind.
If the kind is unknown (or inexact), null is returned as the default
value.
These are (somewhat) arbitrary values that mostly shouldn’t be used, but
are particularly useful for the “infallible assignment” expression,
where the ok value is set to the default value kind if the expression
results in an error.