Struct bsp_types::ShowMessage
source · [−]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
sourceimpl 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
sourceimpl Clone for ShowMessage
impl Clone for ShowMessage
sourcefn clone(&self) -> ShowMessage
fn clone(&self) -> ShowMessage
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 ShowMessage
impl Debug for ShowMessage
sourceimpl Default for ShowMessage
impl Default for ShowMessage
sourcefn default() -> ShowMessage
fn default() -> ShowMessage
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for ShowMessage
impl<'de> Deserialize<'de> for ShowMessage
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 ShowMessage
impl Serialize for ShowMessage
Auto Trait Implementations
impl RefUnwindSafe for ShowMessage
impl Send for ShowMessage
impl Sync for ShowMessage
impl Unpin for ShowMessage
impl UnwindSafe for ShowMessage
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