[−][src]Enum ws_stream_wasm::WsMessage
Represents a WebSocket Message, after converting from JavaScript type.
Variants
Text(String)
The data of the message is a string.
The message contains binary data.
Trait Implementations
impl AsRef<[u8]> for WsMessage
[src]
impl Clone for WsMessage
[src]
impl Debug for WsMessage
[src]
impl Eq for WsMessage
[src]
impl From<String> for WsMessage
[src]
impl From<Vec<u8>> for WsMessage
[src]
impl From<WsMessage> for Vec<u8>
[src]
impl Hash for WsMessage
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<WsMessage> for WsMessage
[src]
impl Sink<WsMessage> for WsStream
[src]
type Error = WsErr
The type of value produced by the sink when an error occurs.
fn poll_ready(
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Result<(), Self::Error>>
[src]
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Result<(), Self::Error>>
fn start_send(self: Pin<&mut Self>, item: WsMessage) -> Result<(), Self::Error>
[src]
fn poll_flush(
self: Pin<&mut Self>,
_: &mut Context<'_>
) -> Poll<Result<(), Self::Error>>
[src]
self: Pin<&mut Self>,
_: &mut Context<'_>
) -> Poll<Result<(), Self::Error>>
fn poll_close(
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Result<(), Self::Error>>
[src]
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Result<(), Self::Error>>
impl StructuralEq for WsMessage
[src]
impl StructuralPartialEq for WsMessage
[src]
impl TryFrom<MessageEvent> for WsMessage
[src]
This will convert the JavaScript event into a WsMessage. Note that this will only work if the connection is set to use the binary type ArrayBuffer. On binary type Blob, this will panic.
Auto Trait Implementations
impl RefUnwindSafe for WsMessage
impl Send for WsMessage
impl Sync for WsMessage
impl Unpin for WsMessage
impl UnwindSafe for WsMessage
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,