[][src]Struct bytecodec::fixnum::U32leEncoder

pub struct U32leEncoder(_);

Encoder which encodes u32 values by little-endian byte order.

Examples

use bytecodec::EncodeExt;
use bytecodec::fixnum::U32leEncoder;
use bytecodec::io::IoEncodeExt;

let mut output = Vec::new();
let mut encoder = U32leEncoder::with_item(0x0102_0304).unwrap();
encoder.encode_all(&mut output).unwrap();
assert_eq!(output, [0x04, 0x03, 0x02, 0x01]);

Methods

impl U32leEncoder[src]

pub fn new() -> Self[src]

Makes a new U32leEncoder instance.

Trait Implementations

impl Encode for U32leEncoder[src]

type Item = u32

The type of items to be encoded.

impl SizedEncode for U32leEncoder[src]

impl Default for U32leEncoder[src]

impl Debug for U32leEncoder[src]

Auto Trait Implementations

Blanket Implementations

impl<T> IoEncodeExt for T where
    T: Encode
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]