pub enum RequestFromServer {
ServerRequest(ServerRequest),
CustomRequest(Value),
}
Expand description
To determine standard and custom request from the server side Custom requests are of type serde_json::Value and can be deserialized into any custom type.
Variants§
ServerRequest(ServerRequest)
CustomRequest(Value)
Implementations§
Trait Implementations§
Source§impl Clone for RequestFromServer
impl Clone for RequestFromServer
Source§fn clone(&self) -> RequestFromServer
fn clone(&self) -> RequestFromServer
Returns a copy 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 Debug for RequestFromServer
impl Debug for RequestFromServer
Source§impl<'de> Deserialize<'de> for RequestFromServer
impl<'de> Deserialize<'de> for RequestFromServer
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<CreateMessageRequest> for RequestFromServer
impl From<CreateMessageRequest> for RequestFromServer
Source§fn from(value: CreateMessageRequest) -> Self
fn from(value: CreateMessageRequest) -> Self
Converts to this type from the input type.
Source§impl From<ListRootsRequest> for RequestFromServer
impl From<ListRootsRequest> for RequestFromServer
Source§fn from(value: ListRootsRequest) -> Self
fn from(value: ListRootsRequest) -> Self
Converts to this type from the input type.
Source§impl From<PingRequest> for RequestFromServer
impl From<PingRequest> for RequestFromServer
Source§fn from(value: PingRequest) -> Self
fn from(value: PingRequest) -> Self
Converts to this type from the input type.
Source§impl From<RequestFromServer> for MessageFromServer
impl From<RequestFromServer> for MessageFromServer
Source§fn from(value: RequestFromServer) -> Self
fn from(value: RequestFromServer) -> Self
Converts to this type from the input type.
Source§impl From<ServerRequest> for RequestFromServer
impl From<ServerRequest> for RequestFromServer
Source§fn from(value: ServerRequest) -> Self
fn from(value: ServerRequest) -> Self
Converts to this type from the input type.
Source§impl From<Value> for RequestFromServer
impl From<Value> for RequestFromServer
Source§impl Serialize for RequestFromServer
impl Serialize for RequestFromServer
Source§impl TryFrom<RequestFromServer> for CreateMessageRequest
impl TryFrom<RequestFromServer> for CreateMessageRequest
Source§type Error = JsonrpcErrorError
type Error = JsonrpcErrorError
The type returned in the event of a conversion error.
Source§impl TryFrom<RequestFromServer> for ListRootsRequest
impl TryFrom<RequestFromServer> for ListRootsRequest
Source§type Error = JsonrpcErrorError
type Error = JsonrpcErrorError
The type returned in the event of a conversion error.
Source§impl TryFrom<RequestFromServer> for PingRequest
impl TryFrom<RequestFromServer> for PingRequest
Source§type Error = JsonrpcErrorError
type Error = JsonrpcErrorError
The type returned in the event of a conversion error.
Source§impl TryFrom<RequestFromServer> for ServerRequest
impl TryFrom<RequestFromServer> for ServerRequest
Source§type Error = JsonrpcErrorError
type Error = JsonrpcErrorError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl Freeze for RequestFromServer
impl RefUnwindSafe for RequestFromServer
impl Send for RequestFromServer
impl Sync for RequestFromServer
impl Unpin for RequestFromServer
impl UnwindSafe for RequestFromServer
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