pub struct WorkerEvent<T> {
pub payload: T,
pub bytes: Option<Vec<u8>>,
}Expand description
An event received from a Web Worker.
Contains the deserialized payload and an optional binary sidecar
that was transferred zero-copy via ArrayBuffer.
Fields§
§payload: TThe deserialized event payload.
bytes: Option<Vec<u8>>Optional binary data transferred zero-copy.
Trait Implementations§
Source§impl<T: Clone> Clone for WorkerEvent<T>
impl<T: Clone> Clone for WorkerEvent<T>
Source§fn clone(&self) -> WorkerEvent<T>
fn clone(&self) -> WorkerEvent<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<T> Freeze for WorkerEvent<T>where
T: Freeze,
impl<T> RefUnwindSafe for WorkerEvent<T>where
T: RefUnwindSafe,
impl<T> Send for WorkerEvent<T>where
T: Send,
impl<T> Sync for WorkerEvent<T>where
T: Sync,
impl<T> Unpin for WorkerEvent<T>where
T: Unpin,
impl<T> UnsafeUnpin for WorkerEvent<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for WorkerEvent<T>where
T: UnwindSafe,
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