pub trait GetWithDefault {
type Item;
// Required method
fn get_with_default<T: Into<Self::Item>>(&self, default: T) -> Self::Item;
}
Expand description
This trait is designed to provide a rude form of default value for options If an option doesn’t have a default value, it will implement this trait
Required Associated Types§
Required Methods§
Sourcefn get_with_default<T: Into<Self::Item>>(&self, default: T) -> Self::Item
fn get_with_default<T: Into<Self::Item>>(&self, default: T) -> Self::Item
This function can be used to retrieve the value of the command line option taking in account the default value used as argument
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.