pub struct CmdNameTable { /* private fields */ }Expand description
Command name hash table
Implementations§
Source§impl CmdNameTable
impl CmdNameTable
pub fn new() -> Self
pub fn set_path(&mut self, path: Vec<String>)
pub fn set_hash_executables_only(&mut self, value: bool)
pub fn add(&mut self, cmd: CmdName)
pub fn get(&self, name: &str) -> Option<&CmdName>
pub fn get_including_disabled(&self, name: &str) -> Option<&CmdName>
pub fn remove(&mut self, name: &str) -> Option<CmdName>
pub fn clear(&mut self)
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Sourcepub fn get_full_path(&self, name: &str) -> Option<PathBuf>
pub fn get_full_path(&self, name: &str) -> Option<PathBuf>
Get full path for a command
Trait Implementations§
Source§impl Debug for CmdNameTable
impl Debug for CmdNameTable
Auto Trait Implementations§
impl Freeze for CmdNameTable
impl RefUnwindSafe for CmdNameTable
impl Send for CmdNameTable
impl Sync for CmdNameTable
impl Unpin for CmdNameTable
impl UnsafeUnpin for CmdNameTable
impl UnwindSafe for CmdNameTable
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
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