pub struct LoggingMessageParams {
pub level: LoggingLevel,
pub logger: Option<String>,
pub data: Value,
pub meta: Option<HashMap<String, Value>>,
}
Expand description
Parameters for notifications/message logging (per MCP spec)
Fields§
§level: LoggingLevel
Log level
logger: Option<String>
Optional logger name
data: Value
Log data (any serializable type)
meta: Option<HashMap<String, Value>>
Meta information (optional _meta field inside params)
Implementations§
Source§impl LoggingMessageParams
impl LoggingMessageParams
pub fn new(level: LoggingLevel, data: Value) -> LoggingMessageParams
pub fn with_logger(self, logger: impl Into<String>) -> LoggingMessageParams
pub fn with_meta(self, meta: HashMap<String, Value>) -> LoggingMessageParams
Trait Implementations§
Source§impl Clone for LoggingMessageParams
impl Clone for LoggingMessageParams
Source§fn clone(&self) -> LoggingMessageParams
fn clone(&self) -> LoggingMessageParams
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 LoggingMessageParams
impl Debug for LoggingMessageParams
Source§impl<'de> Deserialize<'de> for LoggingMessageParams
impl<'de> Deserialize<'de> for LoggingMessageParams
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<LoggingMessageParams, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<LoggingMessageParams, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl HasLevelParam for LoggingMessageParams
impl HasLevelParam for LoggingMessageParams
fn level(&self) -> &LoggingLevel
Source§impl HasMetaParam for LoggingMessageParams
impl HasMetaParam for LoggingMessageParams
Source§impl Serialize for LoggingMessageParams
impl Serialize for LoggingMessageParams
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
impl Params for LoggingMessageParams
Auto Trait Implementations§
impl Freeze for LoggingMessageParams
impl RefUnwindSafe for LoggingMessageParams
impl Send for LoggingMessageParams
impl Sync for LoggingMessageParams
impl Unpin for LoggingMessageParams
impl UnwindSafe for LoggingMessageParams
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