Skip to main content

TryFromLeStream

Trait TryFromLeStream 

Source
pub trait TryFromLeStream<T>: TryFrom<T> {
    // Required method
    fn try_from_le_stream<I>(
        bytes: I,
    ) -> Result<Self, Option<<Self as TryFrom<T>>::Error>>
       where I: Iterator<Item = u8>;
}
Expand description

Try to parse an object from a stream of bytes with little endianness.

Required Methods§

Source

fn try_from_le_stream<I>( bytes: I, ) -> Result<Self, Option<<Self as TryFrom<T>>::Error>>
where I: Iterator<Item = u8>,

Try to parse an object from a stream of bytes with little endianness.

§Errors

Returns None if the stream terminates prematurely, or Some(error) if the parsing fails.

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, U> TryFromLeStream<T> for U
where T: FromLeStream, U: TryFrom<T>,