pub enum WsMessageOrResponse<I> {
Response(WsResponse<I>),
ErrorResponse(WsErrorResponse),
Notification(WsNotification<NotificationInner<String, I>>),
}
Expand description
Message from the server to the client
Variants§
Response(WsResponse<I>)
A response to a request
ErrorResponse(WsErrorResponse)
An error response
Notification(WsNotification<NotificationInner<String, I>>)
A notification
Trait Implementations§
Source§impl<I> Clone for WsMessageOrResponse<I>where
I: Clone,
impl<I> Clone for WsMessageOrResponse<I>where
I: Clone,
Source§fn clone(&self) -> WsMessageOrResponse<I>
fn clone(&self) -> WsMessageOrResponse<I>
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 moreSource§impl<I> Debug for WsMessageOrResponse<I>where
I: Debug,
impl<I> Debug for WsMessageOrResponse<I>where
I: Debug,
Source§impl<'de, I> Deserialize<'de> for WsMessageOrResponse<I>where
I: Serialize + DeserializeOwned,
impl<'de, I> Deserialize<'de> for WsMessageOrResponse<I>where
I: Serialize + DeserializeOwned,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<WsMessageOrResponse<I>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<WsMessageOrResponse<I>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<I> From<(usize, Result<WsResponseResult<I>, WsErrorBody>)> for WsMessageOrResponse<I>
impl<I> From<(usize, Result<WsResponseResult<I>, WsErrorBody>)> for WsMessageOrResponse<I>
Source§fn from(
_: (usize, Result<WsResponseResult<I>, WsErrorBody>),
) -> WsMessageOrResponse<I>
fn from( _: (usize, Result<WsResponseResult<I>, WsErrorBody>), ) -> WsMessageOrResponse<I>
Converts to this type from the input type.
Source§impl<I> Serialize for WsMessageOrResponse<I>where
I: Serialize + DeserializeOwned,
impl<I> Serialize for WsMessageOrResponse<I>where
I: Serialize + DeserializeOwned,
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl<I> Freeze for WsMessageOrResponse<I>where
I: Freeze,
impl<I> RefUnwindSafe for WsMessageOrResponse<I>where
I: RefUnwindSafe,
impl<I> Send for WsMessageOrResponse<I>where
I: Send,
impl<I> Sync for WsMessageOrResponse<I>where
I: Sync,
impl<I> Unpin for WsMessageOrResponse<I>where
I: Unpin,
impl<I> UnwindSafe for WsMessageOrResponse<I>where
I: 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