pub struct ProgressNotification {
pub params: ProgressNotificationParams,
/* private fields */
}
Expand description
An out-of-band notification used to inform the receiver of a progress update for a long-running request.
JSON schema
{
"description": "An out-of-band notification used to inform the receiver of a progress update for a long-running request.",
"type": "object",
"required": [
"method",
"params"
],
"properties": {
"method": {
"type": "string",
"const": "notifications/progress"
},
"params": {
"type": "object",
"required": [
"progress",
"progressToken"
],
"properties": {
"message": {
"description": "An optional message describing the current progress.",
"type": "string"
},
"progress": {
"description": "The progress thus far. This should increase every time progress is made, even if the total is unknown.",
"type": "number"
},
"progressToken": {
"description": "The progress token which was given in the initial request, used to associate this notification with the request that is proceeding.",
"$ref": "#/definitions/ProgressToken"
},
"total": {
"description": "Total number of items to process (or total progress required), if known.",
"type": "number"
}
}
}
}
}
Fields§
§params: ProgressNotificationParams
Implementations§
Source§impl ProgressNotification
impl ProgressNotification
pub fn new(params: ProgressNotificationParams) -> ProgressNotification
pub fn method(&self) -> &String
pub fn method_name() -> String
Trait Implementations§
Source§impl Clone for ProgressNotification
impl Clone for ProgressNotification
Source§fn clone(&self) -> ProgressNotification
fn clone(&self) -> ProgressNotification
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 ProgressNotification
impl Debug for ProgressNotification
Source§impl<'de> Deserialize<'de> for ProgressNotification
impl<'de> Deserialize<'de> for ProgressNotification
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ProgressNotification, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ProgressNotification, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<ProgressNotification> for ClientJsonrpcNotification
impl From<ProgressNotification> for ClientJsonrpcNotification
Source§fn from(value: ProgressNotification) -> ClientJsonrpcNotification
fn from(value: ProgressNotification) -> ClientJsonrpcNotification
Converts to this type from the input type.
Source§impl From<ProgressNotification> for ClientNotification
impl From<ProgressNotification> for ClientNotification
Source§fn from(value: ProgressNotification) -> ClientNotification
fn from(value: ProgressNotification) -> ClientNotification
Converts to this type from the input type.
Source§impl From<ProgressNotification> for MessageFromClient
impl From<ProgressNotification> for MessageFromClient
Source§fn from(value: ProgressNotification) -> MessageFromClient
fn from(value: ProgressNotification) -> MessageFromClient
Converts to this type from the input type.
Source§impl From<ProgressNotification> for MessageFromServer
impl From<ProgressNotification> for MessageFromServer
Source§fn from(value: ProgressNotification) -> MessageFromServer
fn from(value: ProgressNotification) -> MessageFromServer
Converts to this type from the input type.
Source§impl From<ProgressNotification> for NotificationFromClient
impl From<ProgressNotification> for NotificationFromClient
Source§fn from(value: ProgressNotification) -> NotificationFromClient
fn from(value: ProgressNotification) -> NotificationFromClient
Converts to this type from the input type.
Source§impl From<ProgressNotification> for NotificationFromServer
impl From<ProgressNotification> for NotificationFromServer
Source§fn from(value: ProgressNotification) -> NotificationFromServer
fn from(value: ProgressNotification) -> NotificationFromServer
Converts to this type from the input type.
Source§impl From<ProgressNotification> for ServerJsonrpcNotification
impl From<ProgressNotification> for ServerJsonrpcNotification
Source§fn from(value: ProgressNotification) -> ServerJsonrpcNotification
fn from(value: ProgressNotification) -> ServerJsonrpcNotification
Converts to this type from the input type.
Source§impl From<ProgressNotification> for ServerNotification
impl From<ProgressNotification> for ServerNotification
Source§fn from(value: ProgressNotification) -> ServerNotification
fn from(value: ProgressNotification) -> ServerNotification
Converts to this type from the input type.
Source§impl FromMessage<ProgressNotification> for ClientMessage
impl FromMessage<ProgressNotification> for ClientMessage
fn from_message( message: ProgressNotification, request_id: Option<RequestId>, ) -> Result<ClientMessage, RpcError>
Source§impl FromMessage<ProgressNotification> for ServerMessage
impl FromMessage<ProgressNotification> for ServerMessage
fn from_message( message: ProgressNotification, request_id: Option<RequestId>, ) -> Result<ServerMessage, RpcError>
Source§impl Serialize for ProgressNotification
impl Serialize for ProgressNotification
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
Source§impl ToMessage<ClientMessage> for ProgressNotification
impl ToMessage<ClientMessage> for ProgressNotification
fn to_message( self, request_id: Option<RequestId>, ) -> Result<ClientMessage, RpcError>
Source§impl ToMessage<ServerMessage> for ProgressNotification
impl ToMessage<ServerMessage> for ProgressNotification
fn to_message( self, request_id: Option<RequestId>, ) -> Result<ServerMessage, RpcError>
Source§impl TryFrom<NotificationFromClient> for ProgressNotification
impl TryFrom<NotificationFromClient> for ProgressNotification
Source§fn try_from(
value: NotificationFromClient,
) -> Result<ProgressNotification, <ProgressNotification as TryFrom<NotificationFromClient>>::Error>
fn try_from( value: NotificationFromClient, ) -> Result<ProgressNotification, <ProgressNotification as TryFrom<NotificationFromClient>>::Error>
Performs the conversion.
Source§impl TryFrom<NotificationFromServer> for ProgressNotification
impl TryFrom<NotificationFromServer> for ProgressNotification
Source§fn try_from(
value: NotificationFromServer,
) -> Result<ProgressNotification, <ProgressNotification as TryFrom<NotificationFromServer>>::Error>
fn try_from( value: NotificationFromServer, ) -> Result<ProgressNotification, <ProgressNotification as TryFrom<NotificationFromServer>>::Error>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for ProgressNotification
impl RefUnwindSafe for ProgressNotification
impl Send for ProgressNotification
impl Sync for ProgressNotification
impl Unpin for ProgressNotification
impl UnwindSafe for ProgressNotification
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