Struct bsp_types::LogMessage
source · [−]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
sourceimpl 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
sourceimpl Clone for LogMessage
impl Clone for LogMessage
sourcefn clone(&self) -> LogMessage
fn clone(&self) -> LogMessage
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for LogMessage
impl Debug for LogMessage
sourceimpl Default for LogMessage
impl Default for LogMessage
sourcefn default() -> LogMessage
fn default() -> LogMessage
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for LogMessage
impl<'de> Deserialize<'de> for LogMessage
sourcefn 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
sourceimpl Serialize for LogMessage
impl Serialize for LogMessage
Auto Trait Implementations
impl RefUnwindSafe for LogMessage
impl Send for LogMessage
impl Sync for LogMessage
impl Unpin for LogMessage
impl UnwindSafe for LogMessage
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more