pub struct ResourceUpdatedNotification {
pub params: ResourceUpdatedNotificationParams,
/* private fields */
}
Expand description
A notification from the server to the client, informing it that a resource has changed and may need to be read again. This should only be sent if the client previously sent a resources/subscribe request.
JSON schema
{
"description": "A notification from the server to the client, informing it that a resource has changed and may need to be read again. This should only be sent if the client previously sent a resources/subscribe request.",
"type": "object",
"required": [
"method",
"params"
],
"properties": {
"method": {
"type": "string",
"const": "notifications/resources/updated"
},
"params": {
"type": "object",
"required": [
"uri"
],
"properties": {
"uri": {
"description": "The URI of the resource that has been updated. This might be a sub-resource of the one that the client actually subscribed to.",
"type": "string",
"format": "uri"
}
}
}
}
}
Fields§
§params: ResourceUpdatedNotificationParams
Implementations§
Source§impl ResourceUpdatedNotification
impl ResourceUpdatedNotification
pub fn new( params: ResourceUpdatedNotificationParams, ) -> ResourceUpdatedNotification
pub fn method(&self) -> &String
pub fn method_name() -> String
Trait Implementations§
Source§impl Clone for ResourceUpdatedNotification
impl Clone for ResourceUpdatedNotification
Source§fn clone(&self) -> ResourceUpdatedNotification
fn clone(&self) -> ResourceUpdatedNotification
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 ResourceUpdatedNotification
impl Debug for ResourceUpdatedNotification
Source§impl<'de> Deserialize<'de> for ResourceUpdatedNotification
impl<'de> Deserialize<'de> for ResourceUpdatedNotification
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ResourceUpdatedNotification, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ResourceUpdatedNotification, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<ResourceUpdatedNotification> for MessageFromServer
impl From<ResourceUpdatedNotification> for MessageFromServer
Source§fn from(value: ResourceUpdatedNotification) -> MessageFromServer
fn from(value: ResourceUpdatedNotification) -> MessageFromServer
Converts to this type from the input type.
Source§impl From<ResourceUpdatedNotification> for NotificationFromServer
impl From<ResourceUpdatedNotification> for NotificationFromServer
Source§fn from(value: ResourceUpdatedNotification) -> NotificationFromServer
fn from(value: ResourceUpdatedNotification) -> NotificationFromServer
Converts to this type from the input type.
Source§impl From<ResourceUpdatedNotification> for ServerJsonrpcNotification
impl From<ResourceUpdatedNotification> for ServerJsonrpcNotification
Source§fn from(value: ResourceUpdatedNotification) -> ServerJsonrpcNotification
fn from(value: ResourceUpdatedNotification) -> ServerJsonrpcNotification
Converts to this type from the input type.
Source§impl From<ResourceUpdatedNotification> for ServerNotification
impl From<ResourceUpdatedNotification> for ServerNotification
Source§fn from(value: ResourceUpdatedNotification) -> ServerNotification
fn from(value: ResourceUpdatedNotification) -> ServerNotification
Converts to this type from the input type.
Source§impl FromMessage<ResourceUpdatedNotification> for ServerMessage
impl FromMessage<ResourceUpdatedNotification> for ServerMessage
fn from_message( message: ResourceUpdatedNotification, request_id: Option<RequestId>, ) -> Result<ServerMessage, RpcError>
Source§impl Serialize for ResourceUpdatedNotification
impl Serialize for ResourceUpdatedNotification
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<ServerMessage> for ResourceUpdatedNotification
impl ToMessage<ServerMessage> for ResourceUpdatedNotification
fn to_message( self, request_id: Option<RequestId>, ) -> Result<ServerMessage, RpcError>
Source§impl TryFrom<NotificationFromServer> for ResourceUpdatedNotification
impl TryFrom<NotificationFromServer> for ResourceUpdatedNotification
Source§fn try_from(
value: NotificationFromServer,
) -> Result<ResourceUpdatedNotification, <ResourceUpdatedNotification as TryFrom<NotificationFromServer>>::Error>
fn try_from( value: NotificationFromServer, ) -> Result<ResourceUpdatedNotification, <ResourceUpdatedNotification as TryFrom<NotificationFromServer>>::Error>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for ResourceUpdatedNotification
impl RefUnwindSafe for ResourceUpdatedNotification
impl Send for ResourceUpdatedNotification
impl Sync for ResourceUpdatedNotification
impl Unpin for ResourceUpdatedNotification
impl UnwindSafe for ResourceUpdatedNotification
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