pub enum ShellComponentKind {
Export,
Alias,
Function,
Snippet,
}Expand description
Shell 组件类型。
wire value 由 strum(serialize = "...") 固定为 export、alias、function、
snippet;Display 则返回渲染文件中的分组名。两者用途不同,不要互相替换。
Variants§
Implementations§
Source§impl ShellComponentKind
impl ShellComponentKind
pub fn from_code_or_default(value: &str) -> Self
Trait Implementations§
Source§impl Clone for ShellComponentKind
impl Clone for ShellComponentKind
Source§fn clone(&self) -> ShellComponentKind
fn clone(&self) -> ShellComponentKind
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ShellComponentKind
Source§impl Debug for ShellComponentKind
impl Debug for ShellComponentKind
Source§impl Default for ShellComponentKind
impl Default for ShellComponentKind
Source§fn default() -> ShellComponentKind
fn default() -> ShellComponentKind
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ShellComponentKind
impl<'de> Deserialize<'de> for ShellComponentKind
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
Source§impl Display for ShellComponentKind
impl Display for ShellComponentKind
impl Eq for ShellComponentKind
Source§impl<'_derivative_strum> From<&'_derivative_strum ShellComponentKind> for &'static str
impl<'_derivative_strum> From<&'_derivative_strum ShellComponentKind> for &'static str
Source§fn from(x: &'_derivative_strum ShellComponentKind) -> &'static str
fn from(x: &'_derivative_strum ShellComponentKind) -> &'static str
Converts to this type from the input type.
Source§impl From<ShellComponentKind> for &'static str
impl From<ShellComponentKind> for &'static str
Source§fn from(x: ShellComponentKind) -> &'static str
fn from(x: ShellComponentKind) -> &'static str
Converts to this type from the input type.
Source§impl FromStr for ShellComponentKind
impl FromStr for ShellComponentKind
Source§impl Hash for ShellComponentKind
impl Hash for ShellComponentKind
Source§impl Ord for ShellComponentKind
impl Ord for ShellComponentKind
Source§fn cmp(&self, other: &ShellComponentKind) -> Ordering
fn cmp(&self, other: &ShellComponentKind) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ShellComponentKind
impl PartialEq for ShellComponentKind
Source§fn eq(&self, other: &ShellComponentKind) -> bool
fn eq(&self, other: &ShellComponentKind) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for ShellComponentKind
impl PartialOrd for ShellComponentKind
Source§impl Serialize for ShellComponentKind
impl Serialize for ShellComponentKind
impl StructuralPartialEq for ShellComponentKind
Source§impl TryFrom<&str> for ShellComponentKind
impl TryFrom<&str> for ShellComponentKind
Source§impl VariantArray for ShellComponentKind
impl VariantArray for ShellComponentKind
Auto Trait Implementations§
impl Freeze for ShellComponentKind
impl RefUnwindSafe for ShellComponentKind
impl Send for ShellComponentKind
impl Sync for ShellComponentKind
impl Unpin for ShellComponentKind
impl UnsafeUnpin for ShellComponentKind
impl UnwindSafe for ShellComponentKind
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