#[repr(C)]pub struct JSAutoStructuredCloneBuffer {
pub data_: JSStructuredCloneData,
pub version_: u32,
}Expand description
The C-style API calls to read and write structured clones are fragile – they rely on the caller to properly handle ownership of the clone data, and the handling of the input data as well as the interpretation of the contents of the clone buffer are dependent on the callbacks passed in. If you serialize and deserialize with different callbacks, the results are questionable.
JSAutoStructuredCloneBuffer wraps things up in an RAII class for data management, and uses the same callbacks for both writing and reading (serializing and deserializing).
Fields§
§data_: JSStructuredCloneData§version_: u32Trait Implementations§
Source§impl Debug for JSAutoStructuredCloneBuffer
impl Debug for JSAutoStructuredCloneBuffer
impl StructuralPartialEq for JSAutoStructuredCloneBuffer
Auto Trait Implementations§
impl Freeze for JSAutoStructuredCloneBuffer
impl RefUnwindSafe for JSAutoStructuredCloneBuffer
impl !Send for JSAutoStructuredCloneBuffer
impl !Sync for JSAutoStructuredCloneBuffer
impl Unpin for JSAutoStructuredCloneBuffer
impl UnwindSafe for JSAutoStructuredCloneBuffer
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
Source§impl<T> Filterable for T
impl<T> Filterable for T
Source§fn filterable(
self,
filter_name: &'static str,
) -> RequestFilterDataProvider<T, fn(DataRequest<'_>) -> bool>
fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(DataRequest<'_>) -> bool>
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<T> MaybeSendSync for T
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 240 bytes