pub trait FromOptionalField<T> {
// Required methods
fn optional(self) -> Result<Option<T>, Error>;
fn required(self, field: impl Into<String>) -> Result<T, Error>;
}
Expand description
An extension trait that adds the methods optional
and required
to any
Option containing a type implementing TryInto<U, Error = Error>
Required 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.