[][src]Struct cjdns_bytes::Writer

pub struct Writer(_);

Buffer writer. Wrapper over Vec<u8.

Implementations

impl Writer[src]

pub fn new() -> Self[src]

Instantiates new writer.

pub fn with_capacity(capacity: usize) -> Self[src]

Instantiates writer with provided capacity.

pub fn into_vec(self) -> Vec<u8>[src]

Converts Writer into Vec<u8>.

pub fn write_u8(&mut self, data: u8)[src]

Writes u8 to buffer.

pub fn write_u16_be(&mut self, data: u16)[src]

Writes big endian u16 to buffer.

pub fn write_u32_be(&mut self, data: u32)[src]

Writes big endian u32 to buffer.

pub fn write_u64_be(&mut self, data: u64)[src]

Writes big endian 64 to buffer.

pub fn write_slice(&mut self, data: &[u8])[src]

Writes slice to buffer.

Auto Trait Implementations

impl RefUnwindSafe for Writer

impl Send for Writer

impl Sync for Writer

impl Unpin for Writer

impl UnwindSafe for Writer

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.