pub struct LoggingMessageParams {
pub level: LogLevel,
pub logger: Option<String>,
pub data: Value,
pub meta: Option<Value>,
}Expand description
Parameters for logging message notification
Fields§
§level: LogLevelSeverity level of the message
logger: Option<String>Optional logger name (e.g., “database”, “auth”, “tools”)
data: ValueStructured data to be logged
meta: Option<Value>Optional protocol-level metadata
Implementations§
Source§impl LoggingMessageParams
impl LoggingMessageParams
Sourcepub fn new(level: LogLevel, data: impl Into<Value>) -> LoggingMessageParams
pub fn new(level: LogLevel, data: impl Into<Value>) -> LoggingMessageParams
Create a new logging message with the given level and data
Sourcepub fn with_logger(self, logger: impl Into<String>) -> LoggingMessageParams
pub fn with_logger(self, logger: impl Into<String>) -> LoggingMessageParams
Set the logger name
Sourcepub fn with_data(self, data: impl Into<Value>) -> LoggingMessageParams
pub fn with_data(self, data: impl Into<Value>) -> LoggingMessageParams
Set the structured data
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 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
Auto Trait Implementations§
impl Freeze for LoggingMessageParams
impl RefUnwindSafe for LoggingMessageParams
impl Send for LoggingMessageParams
impl Sync for LoggingMessageParams
impl Unpin for LoggingMessageParams
impl UnsafeUnpin 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