pub struct LogMessage {
pub typ: MessageType,
pub task: Option<TaskId>,
pub origin_id: Option<String>,
pub message: String,
}Expand description
The log message notification is sent from the server to the client to ask the client to log a particular message.
A build/logMessage notification is similar to LSP’s window/logMessage, except for a few additions like id and originId.
The originId field helps clients know which request originated a notification in case several requests are handled by the client at the same time. It will only be populated if the client defined it in the request that triggered this notification.
Fields§
§typ: MessageTypeThe message type. See {@link MessageType}.
task: Option<TaskId>The task id if any.
origin_id: Option<String>The request id that originated this notification.
message: StringThe actual message.
Implementations§
Source§impl LogMessage
impl LogMessage
pub fn new<S: Into<String>>( typ: MessageType, msg: S, task: Option<TaskId>, orid: Option<S>, ) -> Self
Sourcepub fn info<S: Into<String>>(
msg: S,
task: Option<TaskId>,
orid: Option<S>,
) -> Self
pub fn info<S: Into<String>>( msg: S, task: Option<TaskId>, orid: Option<S>, ) -> Self
Send info message.
Sourcepub fn log<S: Into<String>>(
msg: String,
task: Option<TaskId>,
orid: Option<String>,
) -> Self
pub fn log<S: Into<String>>( msg: String, task: Option<TaskId>, orid: Option<String>, ) -> Self
Send log message.
Trait Implementations§
Source§impl Clone for LogMessage
impl Clone for LogMessage
Source§fn clone(&self) -> LogMessage
fn clone(&self) -> LogMessage
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 LogMessage
impl Debug for LogMessage
Source§impl Default for LogMessage
impl Default for LogMessage
Source§fn default() -> LogMessage
fn default() -> LogMessage
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for LogMessage
impl<'de> Deserialize<'de> for LogMessage
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for LogMessage
impl RefUnwindSafe for LogMessage
impl Send for LogMessage
impl Sync for LogMessage
impl Unpin for LogMessage
impl UnwindSafe for LogMessage
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