[][src]Struct prosto::compress::ProstEncoder

pub struct ProstEncoder<W: Write> { /* fields omitted */ }

Implementations

impl<W: Write> ProstEncoder<W>[src]

pub fn new(writer: W, level: i32) -> Result<Self, Error>[src]

pub fn finish(self) -> Result<W, Error>[src]

Finishes encoder. It has to be called before dropping ProstEncoder!

pub fn get_ref(&self) -> &W[src]

pub fn get_mut(&mut self) -> &mut W[src]

pub fn write<M: Message>(&mut self, message: &M) -> Result<usize, Error>[src]

pub fn flush(&mut self) -> Result<(), Error>[src]

Flushes internal serialized prorobuf buffer. Does not flush zstd Encoder!

Auto Trait Implementations

impl<W> RefUnwindSafe for ProstEncoder<W> where
    W: RefUnwindSafe

impl<W> Send for ProstEncoder<W> where
    W: Send

impl<W> !Sync for ProstEncoder<W>

impl<W> Unpin for ProstEncoder<W> where
    W: Unpin

impl<W> UnwindSafe for ProstEncoder<W> where
    W: UnwindSafe

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.