pub enum Event<I, O>where
I: SocketInput,
O: SocketOutput,
Message: TryFrom<I>,
<Message as TryFrom<I>>::Error: Debug,
<O as TryFrom<Message>>::Error: Debug,{
Message(Result<O, Error<I, O>>),
State(State),
}
Expand description
futures::Stream::Item
type for crate::Socket
when state-events
feature is enabled
Variants§
Message(Result<O, Error<I, O>>)
A message from the websocket mapped with <
SocketOutput
as
TryFrom
>::try_from(
Message
)
State(State)
An update to the state of the underlying gloo::net::websocket::futures::WebSocket
Trait Implementations§
Auto Trait Implementations§
impl<I, O> !Freeze for Event<I, O>
impl<I, O> !RefUnwindSafe for Event<I, O>
impl<I, O> !Send for Event<I, O>
impl<I, O> !Sync for Event<I, O>
impl<I, O> !Unpin for Event<I, O>
impl<I, O> !UnwindSafe for Event<I, O>
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