pub enum BrowserMessageData {
ArrayBuffer(Vec<u8>),
Text,
Blob,
Unrecognized,
}Expand description
Classified payload of one browser message event, as the web-sys shim
observes it after F4 pinned binaryType = "arraybuffer" at construction.
Variants§
ArrayBuffer(Vec<u8>)
One complete binary message delivered as an ArrayBuffer — the only
data shape the transport accepts (F4). The browser has already
reassembled fragmented frames into this single complete message.
Text
A text (string) message. The liminal wire contract admits only binary.
Blob
A Blob — the browser’s asynchronous binary default, which F4 rules
out by pinning binaryType before any message can arrive. Observing
one means the transport contract broke; its contents are never read.
Unrecognized
Message data of any other JavaScript type.
Trait Implementations§
Source§impl Clone for BrowserMessageData
impl Clone for BrowserMessageData
Source§fn clone(&self) -> BrowserMessageData
fn clone(&self) -> BrowserMessageData
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BrowserMessageData
impl Debug for BrowserMessageData
impl Eq for BrowserMessageData
Source§impl PartialEq for BrowserMessageData
impl PartialEq for BrowserMessageData
impl StructuralPartialEq for BrowserMessageData
Auto Trait Implementations§
impl Freeze for BrowserMessageData
impl RefUnwindSafe for BrowserMessageData
impl Send for BrowserMessageData
impl Sync for BrowserMessageData
impl Unpin for BrowserMessageData
impl UnsafeUnpin for BrowserMessageData
impl UnwindSafe for BrowserMessageData
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.