pub enum SpecialSpec {
Default,
EmptyLine,
InitialWord,
}Expand description
A completion spec used in place of a command’s.
Variants§
Default
The spec used when no command’s spec applies (complete -D).
EmptyLine
The spec used when the command line is empty (complete -E).
InitialWord
The spec used for the initial word of a command line (complete -I).
Implementations§
Source§impl SpecialSpec
impl SpecialSpec
Sourcepub const fn command_name(self) -> &'static str
pub const fn command_name(self) -> &'static str
Returns the name that stands in for a command’s with this spec, as
bash’s does: the complete and compopt builtins accept it in
place of a command name, and a completion function for the
empty-line or initial-word spec gets it as $1.
Sourcepub fn from_command_name(name: &str) -> Option<Self>
pub fn from_command_name(name: &str) -> Option<Self>
Returns the special spec that name, bash’s name for it, names, if any.
Trait Implementations§
Source§impl Clone for SpecialSpec
impl Clone for SpecialSpec
impl Copy for SpecialSpec
Source§impl Debug for SpecialSpec
impl Debug for SpecialSpec
Source§impl<'de> Deserialize<'de> for SpecialSpec
Available on crate feature serde only.
impl<'de> Deserialize<'de> for SpecialSpec
Available on crate feature
serde only.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
impl Eq for SpecialSpec
Source§impl Hash for SpecialSpec
impl Hash for SpecialSpec
Source§impl IntoEnumIterator for SpecialSpec
impl IntoEnumIterator for SpecialSpec
type Iterator = SpecialSpecIter
fn iter() -> SpecialSpecIter ⓘ
Source§impl Ord for SpecialSpec
impl Ord for SpecialSpec
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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for SpecialSpec
impl PartialEq for SpecialSpec
Source§impl PartialOrd for SpecialSpec
impl PartialOrd for SpecialSpec
Source§impl Serialize for SpecialSpec
Available on crate feature serde only.
impl Serialize for SpecialSpec
Available on crate feature
serde only.impl StructuralPartialEq for SpecialSpec
Auto Trait Implementations§
impl Freeze for SpecialSpec
impl RefUnwindSafe for SpecialSpec
impl Send for SpecialSpec
impl Sync for SpecialSpec
impl Unpin for SpecialSpec
impl UnsafeUnpin for SpecialSpec
impl UnwindSafe for SpecialSpec
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more