pub trait ParseOptional: AsRef<str> {
// Provided method
fn parse_optional<T: FromStr>(&self) -> Result<Option<T>, T::Err> { ... }
}
Expand description
Extension traits for optionally parsing non-empty strings.
This is a common pattern in Cosmos SDK protobufs.
Provided Methods§
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.