pub trait TryFromInline<'a, S: InlineEncoding>: Sized {
type Error;
// Required method
fn try_from_inline(v: &'a Inline<S>) -> Result<Self, Self::Error>;
}Expand description
A trait for converting a Inline with a specific schema type to a Rust type. This trait is implemented on the concrete Rust type.
Values are 32-byte arrays that represent data at a deserialization boundary.
Conversions may fail depending on the schema and target type. Use
Error = Infallible for conversions that genuinely cannot fail (e.g.
ethnum::U256 from U256BE), and a real error type for narrowing
conversions (e.g. u64 from U256BE).
This is the counterpart to the TryToInline trait.
See TryFromBlob for the counterpart trait for blobs.
Required Associated Types§
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.