pub struct SerializationContext<Output>where
Output: BinaryOutput,{ /* private fields */ }Implementations§
Source§impl<Output> SerializationContext<Output>where
Output: BinaryOutput,
impl<Output> SerializationContext<Output>where
Output: BinaryOutput,
pub fn new(output: Output, options: Options) -> SerializationContext<Output>
pub fn into_output(self) -> Output
pub fn state_mut(&mut self) -> &mut State
pub fn store_ref_or_object(&mut self, value: &impl Any) -> Result<bool, Error>
pub fn options(&self) -> &Options
pub fn push_buffer(&mut self, buffer: Vec<u8>)
pub fn pop_buffer(&mut self) -> Vec<u8> ⓘ
Trait Implementations§
Source§impl<Output> BinaryOutput for SerializationContext<Output>where
Output: BinaryOutput,
impl<Output> BinaryOutput for SerializationContext<Output>where
Output: BinaryOutput,
fn write_u8(&mut self, value: u8)
fn write_bytes(&mut self, bytes: &[u8])
fn write_i8(&mut self, value: i8)
fn write_u16(&mut self, value: u16)
fn write_i16(&mut self, value: i16)
fn write_u32(&mut self, value: u32)
fn write_i32(&mut self, value: i32)
fn write_u64(&mut self, value: u64)
fn write_i64(&mut self, value: i64)
fn write_u128(&mut self, value: u128)
fn write_i128(&mut self, value: i128)
fn write_f32(&mut self, value: f32)
fn write_f64(&mut self, value: f64)
fn write_var_u32(&mut self, value: u32)
fn write_var_i32(&mut self, value: i32)
fn write_compressed( &mut self, bytes: &[u8], opts: Compression, ) -> Result<(), Error>
Auto Trait Implementations§
impl<Output> !Freeze for SerializationContext<Output>
impl<Output> !RefUnwindSafe for SerializationContext<Output>
impl<Output> !Send for SerializationContext<Output>
impl<Output> !Sync for SerializationContext<Output>
impl<Output> Unpin for SerializationContext<Output>where
Output: Unpin,
impl<Output> UnsafeUnpin for SerializationContext<Output>where
Output: UnsafeUnpin,
impl<Output> !UnwindSafe for SerializationContext<Output>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more