pub struct ShowMessage {
pub typ: MessageType,
pub message: String,
pub task: Option<TaskId>,
pub origin_id: Option<String>,
}Expand description
The show message notification is sent from a server to a client to ask the client to display a particular message in the user interface.
A build/showMessage notification is similar to LSP’s window/showMessage, 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}.
message: StringThe actual message.
task: Option<TaskId>The task id if any.
origin_id: Option<String>The request id that originated this notification.
Implementations§
Source§impl ShowMessage
impl ShowMessage
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: S,
task: Option<TaskId>,
orid: Option<S>,
) -> Self
pub fn log<S: Into<String>>( msg: S, task: Option<TaskId>, orid: Option<S>, ) -> Self
Send log message.
Trait Implementations§
Source§impl Clone for ShowMessage
impl Clone for ShowMessage
Source§fn clone(&self) -> ShowMessage
fn clone(&self) -> ShowMessage
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 ShowMessage
impl Debug for ShowMessage
Source§impl Default for ShowMessage
impl Default for ShowMessage
Source§fn default() -> ShowMessage
fn default() -> ShowMessage
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ShowMessage
impl<'de> Deserialize<'de> for ShowMessage
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 ShowMessage
impl RefUnwindSafe for ShowMessage
impl Send for ShowMessage
impl Sync for ShowMessage
impl Unpin for ShowMessage
impl UnwindSafe for ShowMessage
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