pub struct ServerJsonrpcNotification {
pub method: String,
pub notification: NotificationFromServer,
/* private fields */
}
Expand description
“Similar to JsonrpcNotification , but with the variants restricted to server-side notifications.”
Fields§
§method: String
§notification: NotificationFromServer
Implementations§
Source§impl ServerJsonrpcNotification
impl ServerJsonrpcNotification
pub fn new(notification: NotificationFromServer) -> ServerJsonrpcNotification
pub fn jsonrpc(&self) -> &String
Trait Implementations§
Source§impl Clone for ServerJsonrpcNotification
impl Clone for ServerJsonrpcNotification
Source§fn clone(&self) -> ServerJsonrpcNotification
fn clone(&self) -> ServerJsonrpcNotification
Returns a duplicate 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 ServerJsonrpcNotification
impl Debug for ServerJsonrpcNotification
Source§impl<'de> Deserialize<'de> for ServerJsonrpcNotification
impl<'de> Deserialize<'de> for ServerJsonrpcNotification
Source§fn deserialize<D>(
deserializer: D,
) -> Result<ServerJsonrpcNotification, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<ServerJsonrpcNotification, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for ServerJsonrpcNotification
Formats the ServerJsonrpcNotification as a JSON string.
impl Display for ServerJsonrpcNotification
Formats the ServerJsonrpcNotification as a JSON string.
Source§impl From<CancelledNotification> for ServerJsonrpcNotification
impl From<CancelledNotification> for ServerJsonrpcNotification
Source§fn from(value: CancelledNotification) -> ServerJsonrpcNotification
fn from(value: CancelledNotification) -> ServerJsonrpcNotification
Converts to this type from the input type.
Source§impl From<LoggingMessageNotification> for ServerJsonrpcNotification
impl From<LoggingMessageNotification> for ServerJsonrpcNotification
Source§fn from(value: LoggingMessageNotification) -> ServerJsonrpcNotification
fn from(value: LoggingMessageNotification) -> ServerJsonrpcNotification
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<PromptListChangedNotification> for ServerJsonrpcNotification
impl From<PromptListChangedNotification> for ServerJsonrpcNotification
Source§fn from(value: PromptListChangedNotification) -> ServerJsonrpcNotification
fn from(value: PromptListChangedNotification) -> ServerJsonrpcNotification
Converts to this type from the input type.
Source§impl From<ResourceListChangedNotification> for ServerJsonrpcNotification
impl From<ResourceListChangedNotification> for ServerJsonrpcNotification
Source§fn from(value: ResourceListChangedNotification) -> ServerJsonrpcNotification
fn from(value: ResourceListChangedNotification) -> ServerJsonrpcNotification
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<ToolListChangedNotification> for ServerJsonrpcNotification
impl From<ToolListChangedNotification> for ServerJsonrpcNotification
Source§fn from(value: ToolListChangedNotification) -> ServerJsonrpcNotification
fn from(value: ToolListChangedNotification) -> ServerJsonrpcNotification
Converts to this type from the input type.
Source§impl FromStr for ServerJsonrpcNotification
impl FromStr for ServerJsonrpcNotification
Source§impl Serialize for ServerJsonrpcNotification
impl Serialize for ServerJsonrpcNotification
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
Auto Trait Implementations§
impl Freeze for ServerJsonrpcNotification
impl RefUnwindSafe for ServerJsonrpcNotification
impl Send for ServerJsonrpcNotification
impl Sync for ServerJsonrpcNotification
impl Unpin for ServerJsonrpcNotification
impl UnwindSafe for ServerJsonrpcNotification
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string
, but without panic on OOM.