[][src]Struct weezl::encode::Encoder

pub struct Encoder { /* fields omitted */ }

Implementations

impl Encoder[src]

pub fn new(order: BitOrder, size: u8) -> Self[src]

pub fn encode_bytes(&mut self, inp: &[u8], out: &mut [u8]) -> StreamResult[src]

Encode some bytes from inp into out.

See into_stream for high-level functions (this interface is only available with the std feature) and finish for marking the input data as complete.

pub fn into_stream<W: Write>(&mut self, writer: W) -> IntoStream<W>[src]

Construct a decoder into a writer.

pub fn finish(&mut self)[src]

Mark the encoding as finished.

In following calls to encode_bytes the encoder will try to emit an end code after encoding all of inp. It's not recommended, but also not unsound, to use different byte slices in different calls from this point forward. The behaviour after the end marker has been written is unspecified but again you can rely on its being sound.

Auto Trait Implementations

impl !RefUnwindSafe for Encoder

impl Send for Encoder

impl !Sync for Encoder

impl Unpin for Encoder

impl !UnwindSafe for Encoder

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, 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.