pub enum RawWsMessageOrResponse<I> {
Response(WsResponse<I>),
ErrorResponse(WsErrorResponse),
Notification(Box<WsNotification<RawNotificationInner<I>>>),
}Expand description
Raw message from the server to the client.
Use this type when deserializing websocket messages from a mint. Notification
payloads must then be decoded with
deserialize_payload_for_kind.
Variants§
Response(WsResponse<I>)
A response to a request
ErrorResponse(WsErrorResponse)
An error response
Notification(Box<WsNotification<RawNotificationInner<I>>>)
A notification with raw JSON payload
Trait Implementations§
Source§impl<I> Clone for RawWsMessageOrResponse<I>where
I: Clone,
impl<I> Clone for RawWsMessageOrResponse<I>where
I: Clone,
Source§fn clone(&self) -> RawWsMessageOrResponse<I>
fn clone(&self) -> RawWsMessageOrResponse<I>
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<I> Debug for RawWsMessageOrResponse<I>where
I: Debug,
impl<I> Debug for RawWsMessageOrResponse<I>where
I: Debug,
Source§impl<'de, I> Deserialize<'de> for RawWsMessageOrResponse<I>where
I: Serialize + DeserializeOwned,
impl<'de, I> Deserialize<'de> for RawWsMessageOrResponse<I>where
I: Serialize + DeserializeOwned,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<RawWsMessageOrResponse<I>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<RawWsMessageOrResponse<I>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<I> Serialize for RawWsMessageOrResponse<I>where
I: Serialize + DeserializeOwned,
impl<I> Serialize for RawWsMessageOrResponse<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 RawWsMessageOrResponse<I>
impl<I> RefUnwindSafe for RawWsMessageOrResponse<I>
impl<I> Send for RawWsMessageOrResponse<I>
impl<I> Sync for RawWsMessageOrResponse<I>
impl<I> Unpin for RawWsMessageOrResponse<I>
impl<I> UnsafeUnpin for RawWsMessageOrResponse<I>
impl<I> UnwindSafe for RawWsMessageOrResponse<I>
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