pub struct cmdnam_table { /* private fields */ }Expand description
Command name hash table
$cmdtab table of cached executable lookups.
Port of cmdnamtab from Src/hashtable.c — createcmdnamtable()
(line 601), emptycmdnamtable() (line 623), and hashdir()
(line 634) drive populate/clear/fill cycles.
NOT C-FAITHFUL — Rust-only typed wrapper around HashMap.
C uses the generic HashTable struct (zsh.h:1530 / zsh_h.rs:535)
with per-table GSU callback fn pointers (hash/addnode/
getnode/removenode/freenode/printnode/scantab). Each
per-table accessor (cmdnamtab_lock, shfunctab_lock, etc.)
returns a Mutex<HashTable> instance with the appropriate
callbacks wired. When the generic-HashTable substrate lands,
cmdnam_table/shfunc_table/reswd_table/alias_table get deleted
in favor of typed views over the shared HashTable storage.
Implementations§
Source§impl cmdnam_table
impl cmdnam_table
Sourcepub fn set_hash_executables_only(&mut self, value: bool)
pub fn set_hash_executables_only(&mut self, value: bool)
set_hash_executables_only — see implementation.
Sourcepub fn get_including_disabled(&self, name: &str) -> Option<&cmdnam>
pub fn get_including_disabled(&self, name: &str) -> Option<&cmdnam>
get_including_disabled — see implementation.
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. Mirrors C’s
findcmd(name, 1, 0) lookup via cmdnamtab (Src/exec.c:5260).
Trait Implementations§
Source§impl Debug for cmdnam_table
impl Debug for cmdnam_table
Auto Trait Implementations§
impl Freeze for cmdnam_table
impl RefUnwindSafe for cmdnam_table
impl Send for cmdnam_table
impl Sync for cmdnam_table
impl Unpin for cmdnam_table
impl UnsafeUnpin for cmdnam_table
impl UnwindSafe for cmdnam_table
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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>
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>
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