pub struct pardef {
pub name: &'static str,
pub flags: i32,
pub getnfn: usize,
pub scantfn: usize,
pub hash_gsu: usize,
pub array_gsu: usize,
pub pm: usize,
}Expand description
Port of struct pardef from Src/Modules/parameter.c:2179. The
per-magic-assoc parameter spec table — one entry per
${parameters}/${commands}/${functions}/etc. exposed by the
zsh/parameter module.
C definition (c:2179-2187):
struct pardef {
char *name;
int flags;
GetNodeFunc getnfn;
ScanTabFunc scantfn;
GsuHash hash_gsu;
GsuArray array_gsu;
Param pm;
};Rust port keeps the same shape; the GSU function-table fields
(hash_gsu, array_gsu) are type-erased via usize because the
GsuHash/GsuArray types (zsh_h.rs:797-798, Box<gsu_hash> /
Box<gsu_array>) own their callback function pointers and can’t
be const-initialised in a Rust static. Consumers cast back at
dispatch time.
Fields§
§name: &'static strParameter name (e.g. “commands”, “functions”, “options”).
flags: i32Flags (PM_* bits — typically PM_HASHED|PM_SPECIAL|PM_HIDE).
getnfn: usizeGetNodeFunc getnfn — type-erased: 0 when not yet wired.
scantfn: usizeScanTabFunc scantfn — type-erased: 0 when not yet wired.
hash_gsu: usizeGsuHash hash_gsu — type-erased.
array_gsu: usizeGsuArray array_gsu — type-erased.
pm: usizeParam pm — type-erased pointer; populated by createparam.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for pardef
impl RefUnwindSafe for pardef
impl Send for pardef
impl Sync for pardef
impl Unpin for pardef
impl UnsafeUnpin for pardef
impl UnwindSafe for pardef
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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