[][src]Trait xaynet_core::message::FromBytes

pub trait FromBytes: Sized {
    pub fn from_byte_slice<T: AsRef<[u8]>>(
        buffer: &T
    ) -> Result<Self, DecodeError>;
pub fn from_byte_stream<I: Iterator<Item = u8> + ExactSizeIterator>(
        iter: &mut I
    ) -> Result<Self, DecodeError>; }

An interface for deserializable message types.

See also ToBytes for serialization.

Required methods

pub fn from_byte_slice<T: AsRef<[u8]>>(buffer: &T) -> Result<Self, DecodeError>[src]

Deserialize the type from the given buffer.

Errors

May fail if certain parts of the deserialized buffer don't pass message validity checks.

pub fn from_byte_stream<I: Iterator<Item = u8> + ExactSizeIterator>(
    iter: &mut I
) -> Result<Self, DecodeError>
[src]

Loading content...

Implementations on Foreign Types

impl FromBytes for u16[src]

impl FromBytes for u32[src]

Loading content...

Implementors

impl FromBytes for MaskConfig[src]

impl FromBytes for MaskObject[src]

impl FromBytes for MaskUnit[src]

impl FromBytes for MaskVect[src]

impl FromBytes for Chunk[src]

impl FromBytes for Sum2[src]

impl FromBytes for Sum[src]

impl FromBytes for Update[src]

impl FromBytes for LocalSeedDict[src]

impl<T> FromBytes for T where
    T: ByteObject
[src]

Loading content...