pub struct StructuredSerializedData {Show 17 fields
pub serialized: Vec<u8>,
pub blobs: Option<FxHashMap<BlobId, BlobImpl>>,
pub files: Option<FxHashMap<FileId, SerializableFile>>,
pub file_lists: Option<FxHashMap<FileListId, SerializableFileList>>,
pub points: Option<FxHashMap<DomPointId, DomPoint>>,
pub rects: Option<FxHashMap<DomRectId, DomRect>>,
pub quads: Option<FxHashMap<DomQuadId, DomQuad>>,
pub matrices: Option<FxHashMap<DomMatrixId, DomMatrix>>,
pub exceptions: Option<FxHashMap<DomExceptionId, DomException>>,
pub quota_exceeded_errors: Option<FxHashMap<QuotaExceededErrorId, SerializableQuotaExceededError>>,
pub ports: Option<FxHashMap<MessagePortId, MessagePortImpl>>,
pub transform_streams: Option<FxHashMap<MessagePortId, TransformStreamData>>,
pub image_bitmaps: Option<FxHashMap<ImageBitmapId, SerializableImageBitmap>>,
pub transferred_image_bitmaps: Option<FxHashMap<ImageBitmapId, SerializableImageBitmap>>,
pub offscreen_canvases: Option<FxHashMap<OffscreenCanvasId, TransferableOffscreenCanvas>>,
pub image_data: Option<FxHashMap<ImageDataId, SerializableImageData>>,
pub crypto_keys: Option<FxHashMap<CryptoKeyId, SerializableCryptoKey>>,
}Expand description
A data-holder for serialized data and transferred objects. https://html.spec.whatwg.org/multipage/#structuredserializewithtransfer
Fields§
§serialized: Vec<u8>Data serialized by SpiderMonkey.
blobs: Option<FxHashMap<BlobId, BlobImpl>>Serialized in a structured callback,
files: Option<FxHashMap<FileId, SerializableFile>>Serialized files.
file_lists: Option<FxHashMap<FileListId, SerializableFileList>>Serialized file lists.
points: Option<FxHashMap<DomPointId, DomPoint>>Serialized point objects.
rects: Option<FxHashMap<DomRectId, DomRect>>Serialized rect objects.
quads: Option<FxHashMap<DomQuadId, DomQuad>>Serialized quad objects.
matrices: Option<FxHashMap<DomMatrixId, DomMatrix>>Serialized matrix objects.
exceptions: Option<FxHashMap<DomExceptionId, DomException>>Serialized exception objects.
quota_exceeded_errors: Option<FxHashMap<QuotaExceededErrorId, SerializableQuotaExceededError>>Serialized quota exceeded errors.
ports: Option<FxHashMap<MessagePortId, MessagePortImpl>>Transferred objects.
transform_streams: Option<FxHashMap<MessagePortId, TransformStreamData>>Transform streams transferred objects.
image_bitmaps: Option<FxHashMap<ImageBitmapId, SerializableImageBitmap>>Serialized image bitmap objects.
transferred_image_bitmaps: Option<FxHashMap<ImageBitmapId, SerializableImageBitmap>>Transferred image bitmap objects.
offscreen_canvases: Option<FxHashMap<OffscreenCanvasId, TransferableOffscreenCanvas>>Transferred offscreen canvas objects.
image_data: Option<FxHashMap<ImageDataId, SerializableImageData>>Serialized image data objects.
crypto_keys: Option<FxHashMap<CryptoKeyId, SerializableCryptoKey>>Serialized crypto key objects.
Implementations§
Source§impl StructuredSerializedData
impl StructuredSerializedData
fn is_empty(&self, val: Transferrable) -> bool
Sourcefn clone_all_of_type<T: BroadcastClone>(
&self,
cloned: &mut StructuredSerializedData,
)
fn clone_all_of_type<T: BroadcastClone>( &self, cloned: &mut StructuredSerializedData, )
Clone all values of the same type stored in this StructuredSerializedData into another instance.
Sourcepub fn clone_for_broadcast(&self) -> StructuredSerializedData
pub fn clone_for_broadcast(&self) -> StructuredSerializedData
Clone the serialized data for use with broadcast-channels.
Trait Implementations§
Source§impl Debug for StructuredSerializedData
impl Debug for StructuredSerializedData
Source§impl Default for StructuredSerializedData
impl Default for StructuredSerializedData
Source§fn default() -> StructuredSerializedData
fn default() -> StructuredSerializedData
Source§impl<'de> Deserialize<'de> for StructuredSerializedData
impl<'de> Deserialize<'de> for StructuredSerializedData
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl MallocSizeOf for StructuredSerializedData
impl MallocSizeOf for StructuredSerializedData
Source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Auto Trait Implementations§
impl Freeze for StructuredSerializedData
impl !RefUnwindSafe for StructuredSerializedData
impl Send for StructuredSerializedData
impl !Sync for StructuredSerializedData
impl Unpin for StructuredSerializedData
impl UnsafeUnpin for StructuredSerializedData
impl UnwindSafe for StructuredSerializedData
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more