[][src]Trait dusk_bytes::DeserializableSlice

pub trait DeserializableSlice<const N: usize>: Serializable<N> {
    pub fn from_slice(buf: &[u8]) -> Result<Self, Self::Error>
    where
        Self: Sized,
        Self::Error: BadLength
, { ... } }

An optional trait used to implement [from_slice] on top of types that uses Serializable trait. The default implementation makes use of Serializable trait to provide the necessary deserialization functionality without additional code from the consumer.

Provided methods

pub fn from_slice(buf: &[u8]) -> Result<Self, Self::Error> where
    Self: Sized,
    Self::Error: BadLength
[src]

Deserialize a slice of u8 into Self

Loading content...

Implementors

impl<T, const N: usize> DeserializableSlice<N> for T where
    T: Serializable<N>, 
[src]

Loading content...