pub struct PingRequest {
pub params: Option<PingRequestParams>,
/* private fields */
}
Expand description
A ping, issued by either the server or the client, to check that the other party is still alive. The receiver must promptly respond, or else may be disconnected.
JSON schema
{
"description": "A ping, issued by either the server or the client, to check that the other party is still alive. The receiver must promptly respond, or else may be disconnected.",
"type": "object",
"required": [
"method"
],
"properties": {
"method": {
"type": "string",
"const": "ping"
},
"params": {
"type": "object",
"properties": {
"_meta": {
"type": "object",
"properties": {
"progressToken": {
"description": "If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.",
"$ref": "#/definitions/ProgressToken"
}
}
}
},
"additionalProperties": {}
}
}
}
Fields§
§params: Option<PingRequestParams>
Implementations§
Source§impl PingRequest
impl PingRequest
pub fn new(params: Option<PingRequestParams>) -> Self
pub fn method(&self) -> &String
pub fn method_name() -> String
Trait Implementations§
Source§impl Clone for PingRequest
impl Clone for PingRequest
Source§fn clone(&self) -> PingRequest
fn clone(&self) -> PingRequest
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 PingRequest
impl Debug for PingRequest
Source§impl<'de> Deserialize<'de> for PingRequest
impl<'de> Deserialize<'de> for PingRequest
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<PingRequest> for ClientRequest
impl From<PingRequest> for ClientRequest
Source§fn from(value: PingRequest) -> Self
fn from(value: PingRequest) -> Self
Converts to this type from the input type.
Source§impl From<PingRequest> for MessageFromClient
impl From<PingRequest> for MessageFromClient
Source§fn from(value: PingRequest) -> Self
fn from(value: PingRequest) -> Self
Converts to this type from the input type.
Source§impl From<PingRequest> for MessageFromServer
impl From<PingRequest> for MessageFromServer
Source§fn from(value: PingRequest) -> Self
fn from(value: PingRequest) -> Self
Converts to this type from the input type.
Source§impl From<PingRequest> for RequestFromClient
impl From<PingRequest> for RequestFromClient
Source§fn from(value: PingRequest) -> Self
fn from(value: PingRequest) -> 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<PingRequest> for ServerRequest
impl From<PingRequest> for ServerRequest
Source§fn from(value: PingRequest) -> Self
fn from(value: PingRequest) -> Self
Converts to this type from the input type.
Source§impl FromMessage<PingRequest> for ClientMessage
impl FromMessage<PingRequest> for ClientMessage
fn from_message( message: PingRequest, request_id: Option<RequestId>, ) -> Result<Self, RpcError>
Source§impl FromMessage<PingRequest> for ServerMessage
impl FromMessage<PingRequest> for ServerMessage
fn from_message( message: PingRequest, request_id: Option<RequestId>, ) -> Result<Self, RpcError>
Source§impl Serialize for PingRequest
impl Serialize for PingRequest
Source§impl ToMessage<ClientMessage> for PingRequest
impl ToMessage<ClientMessage> for PingRequest
fn to_message( self, request_id: Option<RequestId>, ) -> Result<ClientMessage, RpcError>
Source§impl ToMessage<ServerMessage> for PingRequest
impl ToMessage<ServerMessage> for PingRequest
fn to_message( self, request_id: Option<RequestId>, ) -> Result<ServerMessage, RpcError>
Source§impl TryFrom<RequestFromClient> for PingRequest
impl TryFrom<RequestFromClient> for PingRequest
Source§impl TryFrom<RequestFromServer> for PingRequest
impl TryFrom<RequestFromServer> for PingRequest
Auto Trait Implementations§
impl Freeze for PingRequest
impl RefUnwindSafe for PingRequest
impl Send for PingRequest
impl Sync for PingRequest
impl Unpin for PingRequest
impl UnwindSafe for PingRequest
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