pub struct Snippet {
pub name: String,
pub command: String,
pub scope: SnippetScope,
pub host: Option<String>,
pub tags: Option<Vec<String>>,
pub params: Option<Vec<String>>,
}Expand description
A saved command snippet stored in ~/.config/omnyssh/snippets.toml.
Mirrors the format defined in §7 of the technical specification.
Fields§
§name: String§command: String§scope: SnippetScope§host: Option<String>Required when scope == Host.
params: Option<Vec<String>>Named placeholder parameters, e.g. ["service_name"].
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Snippet
impl<'de> Deserialize<'de> for Snippet
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 Snippet
impl RefUnwindSafe for Snippet
impl Send for Snippet
impl Sync for Snippet
impl Unpin for Snippet
impl UnsafeUnpin for Snippet
impl UnwindSafe for Snippet
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