pub trait FromBytes<V>: Sized {
type Error: Error;
// Required method
async fn from_bytes_with(
bytes: &[u8],
media_type: &str,
verification_params: &V,
options: FromBytesOptions,
) -> Result<Self, Self::Error>;
// Provided method
async fn from_bytes(
bytes: &[u8],
media_type: &str,
verifier: &V,
) -> Result<Self, Self::Error> { ... }
}
Required Associated Types§
Required Methods§
async fn from_bytes_with( bytes: &[u8], media_type: &str, verification_params: &V, options: FromBytesOptions, ) -> Result<Self, Self::Error>
Provided Methods§
async fn from_bytes( bytes: &[u8], media_type: &str, verifier: &V, ) -> Result<Self, Self::Error>
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.