[][src]Struct bytecodec::fixnum::U56leEncoder

pub struct U56leEncoder(_);

Encoder which encodes unsigned 56-bit integers by little-endian byte order.

Although the type of items is u64, the most significant 8-bits must be 0.

Examples

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

let mut output = Vec::new();
let mut encoder = U56leEncoder::with_item(0x0001_0203_0405_0607).unwrap();
encoder.encode_all(&mut output).unwrap();
assert_eq!(output, [0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01]);

Methods

impl U56leEncoder[src]

pub fn new() -> Self[src]

Makes a new U56leEncoder instance.

Trait Implementations

impl Encode for U56leEncoder[src]

type Item = u64

The type of items to be encoded.

impl SizedEncode for U56leEncoder[src]

impl Default for U56leEncoder[src]

impl Debug for U56leEncoder[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]