linera_sdk

Trait FromBcsBytes

Source
pub trait FromBcsBytes: Sized {
    // Required method
    fn from_bcs_bytes(bytes: &[u8]) -> Result<Self, Error>;
}
Expand description

Extension trait to deserialize a type from a vector of bytes using bcs.

Required Methods§

Source

fn from_bcs_bytes(bytes: &[u8]) -> Result<Self, Error>

Deserializes itself from a vector of bytes using bcs.

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.

Implementors§

Source§

impl<T> FromBcsBytes for T