pub struct ValueSerializer<'a> { /* private fields */ }
Implementations§
Source§impl<'a> ValueSerializer<'a>
impl<'a> ValueSerializer<'a>
ValueSerializer is a stack object used as entry-point for an owned and pinned heap object ValueSerializerHeap. The ’a lifetime is the lifetime of the ValueSerializerImpl implementation. The ’s lifetime is the lifetime of the HandleScope which is used to retrieve a Local<’s, Context> for the CallbackScopes
pub fn new<D: ValueSerializerImpl + 'a>( scope: &mut HandleScope<'_>, value_serializer_impl: Box<D>, ) -> Self
Trait Implementations§
Source§impl<'a> ValueSerializerHelper for ValueSerializer<'a>
impl<'a> ValueSerializerHelper for ValueSerializer<'a>
fn get_cxx_value_serializer(&self) -> &CxxValueSerializer
fn write_header(&self)
fn write_value( &self, context: Local<'_, Context>, value: Local<'_, Value>, ) -> Option<bool>
fn write_uint32(&self, value: u32)
fn write_uint64(&self, value: u64)
fn write_double(&self, value: f64)
fn write_raw_bytes(&self, source: &[u8])
fn transfer_array_buffer( &self, transfer_id: u32, array_buffer: Local<'_, ArrayBuffer>, )
fn set_treat_array_buffer_views_as_host_objects(&self, mode: bool)
Auto Trait Implementations§
impl<'a> Freeze for ValueSerializer<'a>
impl<'a> !RefUnwindSafe for ValueSerializer<'a>
impl<'a> !Send for ValueSerializer<'a>
impl<'a> !Sync for ValueSerializer<'a>
impl<'a> Unpin for ValueSerializer<'a>
impl<'a> !UnwindSafe for ValueSerializer<'a>
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