pub struct Command {
pub title: String,
pub command: String,
pub arguments: Option<Vec<Value, Global>>,
}
Expand description
Represents a reference to a command. Provides a title which will be used to represent a command in the UI. Commands are identified by a string identifier. The recommended way to handle commands is to implement their execution on the server side if the client and server provides the corresponding capabilities. Alternatively the tool extension code could handle the command. The protocol currently doesn’t specify a set of well-known commands.
Fields§
§title: String
Title of the command, like save
.
command: String
The identifier of the actual command handler.
arguments: Option<Vec<Value, Global>>
Arguments that the command handler should be invoked with.
Implementations§
Trait Implementations§
§impl<'de> Deserialize<'de> for Command
impl<'de> Deserialize<'de> for Command
§fn deserialize<__D>(
__deserializer: __D
) -> Result<Command, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<Command, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl From<Command> for CodeActionOrCommand
impl From<Command> for CodeActionOrCommand
§fn from(command: Command) -> CodeActionOrCommand
fn from(command: Command) -> CodeActionOrCommand
Converts to this type from the input type.
§impl Serialize for Command
impl Serialize for Command
§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
impl StructuralPartialEq for Command
Auto Trait Implementations§
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnwindSafe for Command
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