[][src]Struct grin_core::ser::BinWriter

pub struct BinWriter<'a> { /* fields omitted */ }

Utility wrapper for an underlying byte Writer. Defines higher level methods to write numbers, byte vectors, hashes, etc.

Methods

impl<'a> BinWriter<'a>[src]

pub fn new(write: &'a mut dyn Write) -> BinWriter<'a>[src]

Wraps a standard Write in a new BinWriter

Trait Implementations

impl<'a> Writer for BinWriter<'a>[src]

fn write_u8(&mut self, n: u8) -> Result<(), Error>[src]

Writes a u8 as bytes

fn write_u16(&mut self, n: u16) -> Result<(), Error>[src]

Writes a u16 as bytes

fn write_u32(&mut self, n: u32) -> Result<(), Error>[src]

Writes a u32 as bytes

fn write_i32(&mut self, n: i32) -> Result<(), Error>[src]

Writes a u32 as bytes

fn write_u64(&mut self, n: u64) -> Result<(), Error>[src]

Writes a u64 as bytes

fn write_i64(&mut self, n: i64) -> Result<(), Error>[src]

Writes a i64 as bytes

fn write_bytes<T: AsFixedBytes>(&mut self, bytes: &T) -> Result<(), Error>[src]

Writes a variable number of bytes. The length is encoded as a 64-bit prefix. Read more

Auto Trait Implementations

impl<'a> !Send for BinWriter<'a>

impl<'a> Unpin for BinWriter<'a>

impl<'a> !Sync for BinWriter<'a>

impl<'a> !UnwindSafe for BinWriter<'a>

impl<'a> !RefUnwindSafe for BinWriter<'a>

Blanket Implementations

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> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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

impl<T> UnsafeAny for T where
    T: Any

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Erased for T