#[non_exhaustive]pub struct WsResponse {
pub request_id: Option<String>,
pub response: JmapResponse,
}Expand description
A JMAP Response sent over the WebSocket (RFC 8887 §4.3.3): an RFC 8620
§3.4 Response plus @type: "Response" and requestId.
requestId “MUST be returned if an identifier is included in the
request”; it is omitted on the wire when None.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.request_id: Option<String>requestId: the id of the WsRequest this answers.
response: JmapResponseThe RFC 8620 Response.
Implementations§
Source§impl WsResponse
impl WsResponse
Sourcepub fn new(response: JmapResponse, request_id: Option<String>) -> Self
pub fn new(response: JmapResponse, request_id: Option<String>) -> Self
A response frame answering the request with id request_id.
Trait Implementations§
Source§impl Clone for WsResponse
impl Clone for WsResponse
Source§impl Debug for WsResponse
impl Debug for WsResponse
Source§impl<'de> Deserialize<'de> for WsResponse
impl<'de> Deserialize<'de> for WsResponse
Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for WsResponse
impl PartialEq for WsResponse
Source§impl Serialize for WsResponse
impl Serialize for WsResponse
impl StructuralPartialEq for WsResponse
Auto Trait Implementations§
impl Forget for WsResponse
impl Freeze for WsResponse
impl Move for WsResponse
impl RefUnwindSafe for WsResponse
impl Send for WsResponse
impl Sync for WsResponse
impl Unpin for WsResponse
impl UnsafeUnpin for WsResponse
impl UnwindSafe for WsResponse
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