SonetWriteBuf

Struct SonetWriteBuf 

Source
pub struct SonetWriteBuf { /* private fields */ }
Expand description

Writable Buf

Implementations§

Source§

impl SonetWriteBuf

Writable Buf Implementation

Source

pub fn new() -> Self

New SonetWriteBuf

Source

pub fn readable(&mut self) -> SonetReadBuf

Convert to SonetReadBuf

Source

pub fn write_byte(&mut self, data: u8)

Write byte or u8

Source

pub fn write_short(&mut self, data: u16)

Write short or u16

Source

pub fn write_int(&mut self, data: u32)

Write int or u32

Source

pub fn write_long(&mut self, data: u64)

Write long or u64

Source

pub fn write_bool(&mut self, data: bool)

Write 0 if false, 1 if true

Source

pub fn write_byte_array(&mut self, data: &Vec<u8>)

Write byte_array or vec

Source

pub fn write_short_array(&mut self, data: &Vec<u16>)

Write short_array or vec

Source

pub fn write_int_array(&mut self, data: &Vec<u32>)

Write int_array or vec

Source

pub fn write_long_array(&mut self, data: &Vec<u64>)

Write long_array or vec

Source

pub fn write_float(&mut self, data: f32)

Write float or f32

Source

pub fn write_double(&mut self, data: f64)

Write double or f64

Source

pub fn write_float_array(&mut self, data: &Vec<f32>)

Write float_array or vec

Source

pub fn write_double_array(&mut self, data: &Vec<f64>)

Write double_array or vec

Source

pub fn write_char(&mut self, data: char)

Write char

Source

pub fn write_string(&mut self, data: &String)

Write String

Source

pub fn parse_types(&mut self, types: Vec<&'static str>, data: Vec<Box<dyn Any>>)

Write with given type and data list

Source

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

Write to the buffer, automatically extending the buffer if required

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

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

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.