pub enum StreamEvent {
InboundSubscriptionRequest(InboundRequest<Subscription>),
InboundError(ClientError),
OutboundError(ClientError),
ConnectionClosed(Option<CloseFrame<'static>>),
}Expand description
Possible events produced by the ClientStream.
The events are produced by polling ClientStream in a loop.
Variants§
InboundSubscriptionRequest(InboundRequest<Subscription>)
Inbound request for receiving a subscription message.
Currently, Subscription is the only request that the Relay sends to
the clients.
InboundError(ClientError)
Error generated when failed to parse an inbound message, invalid request type or message ID.
OutboundError(ClientError)
Error generated when failed to write data to the underlying websocket stream.
ConnectionClosed(Option<CloseFrame<'static>>)
The websocket connection was closed.
This is the last event that can be produced by the stream.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for StreamEvent
impl !RefUnwindSafe for StreamEvent
impl Send for StreamEvent
impl Sync for StreamEvent
impl Unpin for StreamEvent
impl !UnwindSafe for StreamEvent
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