pub struct RawEncoder<W> { /* private fields */ }
Expand description

An encoder for raw binary data

Implementations§

source§

impl<W: Write> RawEncoder<W>

source

pub fn new(writer: W) -> RawEncoder<W>

Constructor

source

pub fn into_inner(self) -> W

Returns the underlying Writer

Trait Implementations§

source§

impl<W: Write> SimpleEncoder for RawEncoder<W>

source§

fn emit_u64(&mut self, v: u64) -> Result<(), Error>

Output a 64-bit uint
source§

fn emit_u32(&mut self, v: u32) -> Result<(), Error>

Output a 32-bit uint
source§

fn emit_u16(&mut self, v: u16) -> Result<(), Error>

Output a 16-bit uint
source§

fn emit_i64(&mut self, v: i64) -> Result<(), Error>

Output a 64-bit int
source§

fn emit_i32(&mut self, v: i32) -> Result<(), Error>

Output a 32-bit int
source§

fn emit_i16(&mut self, v: i16) -> Result<(), Error>

Output a 16-bit int
source§

fn emit_i8(&mut self, v: i8) -> Result<(), Error>

Output a 8-bit int
source§

fn emit_u8(&mut self, v: u8) -> Result<(), Error>

Output a 8-bit uint
source§

fn emit_bool(&mut self, v: bool) -> Result<(), Error>

Output a boolean

Auto Trait Implementations§

§

impl<W> RefUnwindSafe for RawEncoder<W>where W: RefUnwindSafe,

§

impl<W> Send for RawEncoder<W>where W: Send,

§

impl<W> Sync for RawEncoder<W>where W: Sync,

§

impl<W> Unpin for RawEncoder<W>where W: Unpin,

§

impl<W> UnwindSafe for RawEncoder<W>where W: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> SendSyncUnwindSafe for Twhere T: Send + Sync + UnwindSafe + ?Sized,