[][src]Struct bytecodec::fixnum::U8Encoder

pub struct U8Encoder(_);

Encoder which encodes u8 values.

Examples

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

let mut output = Vec::new();
let mut encoder = U8Encoder::with_item(7).unwrap();
encoder.encode_all(&mut output).unwrap();
assert_eq!(output, [7]);

Methods

impl U8Encoder[src]

pub fn new() -> Self[src]

Makes a new U8Encoder instance.

Trait Implementations

impl Debug for U8Encoder[src]

impl Default for U8Encoder[src]

impl Encode for U8Encoder[src]

type Item = u8

The type of items to be encoded.

impl SizedEncode for U8Encoder[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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

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

impl<T> IoEncodeExt for T where
    T: Encode
[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.