pub struct LoggingMessageNotification {
pub method: String,
pub params: LoggingMessageParams,
}Expand description
Complete logging message notification (per MCP spec)
Fields§
§method: StringMethod name (always “notifications/message”)
params: LoggingMessageParamsNotification parameters
Implementations§
Source§impl LoggingMessageNotification
impl LoggingMessageNotification
pub fn new(level: LoggingLevel, data: Value) -> LoggingMessageNotification
pub fn with_logger( self, logger: impl Into<String>, ) -> LoggingMessageNotification
pub fn with_meta( self, meta: HashMap<String, Value>, ) -> LoggingMessageNotification
Trait Implementations§
Source§impl Clone for LoggingMessageNotification
impl Clone for LoggingMessageNotification
Source§fn clone(&self) -> LoggingMessageNotification
fn clone(&self) -> LoggingMessageNotification
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 LoggingMessageNotification
impl Debug for LoggingMessageNotification
Source§impl<'de> Deserialize<'de> for LoggingMessageNotification
impl<'de> Deserialize<'de> for LoggingMessageNotification
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<LoggingMessageNotification, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<LoggingMessageNotification, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl HasLogLevel for LoggingMessageNotification
impl HasLogLevel for LoggingMessageNotification
Source§fn level(&self) -> LoggingLevel
fn level(&self) -> LoggingLevel
The current or target logging level
Source§fn should_log(&self, message_level: LoggingLevel) -> bool
fn should_log(&self, message_level: LoggingLevel) -> bool
Check if a message at the given level should be logged
Source§impl HasLogTransport for LoggingMessageNotification
impl HasLogTransport for LoggingMessageNotification
Source§fn should_deliver(&self, _level: LoggingLevel) -> bool
fn should_deliver(&self, _level: LoggingLevel) -> bool
Optional filtering criteria
Source§fn batch_size(&self) -> Option<usize>
fn batch_size(&self) -> Option<usize>
Optional batching configuration
Source§impl Serialize for LoggingMessageNotification
impl Serialize for LoggingMessageNotification
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 LoggingMessageNotification
impl RefUnwindSafe for LoggingMessageNotification
impl Send for LoggingMessageNotification
impl Sync for LoggingMessageNotification
impl Unpin for LoggingMessageNotification
impl UnwindSafe for LoggingMessageNotification
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.
Source§impl<T> LoggerDefinition for T
impl<T> LoggerDefinition for T
Source§fn to_message_notification(&self) -> LoggingMessageNotification
fn to_message_notification(&self) -> LoggingMessageNotification
Convert this logger definition to a LoggingMessageNotification
Source§fn to_set_level_request(&self) -> SetLevelRequest
fn to_set_level_request(&self) -> SetLevelRequest
Convert this logger definition to a SetLevelRequest