pub struct qualifier_set {Show 17 fields
pub qualifiers: Vec<qualifier>,
pub alternatives: Vec<Vec<qualifier>>,
pub follow_links: bool,
pub sorts: Vec<i32>,
pub sort_exec: Vec<String>,
pub quals: QualArena,
pub first: Option<i32>,
pub last: Option<i32>,
pub colon_mods: Option<String>,
pub pre_words: Vec<String>,
pub post_words: Vec<String>,
pub mark_dirs: bool,
pub list_types: bool,
pub nullglob: bool,
pub globdots: bool,
pub short_circuit: Option<i32>,
pub numsort: Option<bool>,
}Expand description
Parsed glob qualifier set
Compiled qualifier list for one glob.
Mirrors the struct qual * linked list parsepat()
(Src/glob.c:791) builds — every (qual) after a glob pattern
adds to it.
Fields§
§qualifiers: Vec<qualifier>§alternatives: Vec<Vec<qualifier>>§follow_links: bool§sorts: Vec<i32>Packed sort-spec flags, one per o/O qualifier in the pattern.
Each entry is the C struct globsort.tp field — GS_NAME /
GS_DEPTH / GS_EXEC / GS_SIZE / GS_ATIME / GS_MTIME /
GS_CTIME / GS_LINKS (or their << GS_SHIFT follow-link
variants), OR’d with GS_DESC for reverse direction.
sort_exec: Vec<String>c:74 struct globsort.exec — the eval code for each GS_EXEC
(oe:…: / o+…) sort spec, indexed by the idx packed into the
sort entry’s high bits (GS_EXEC | (idx << 16)). Evaluated per
match with $REPLY = the match name; the resulting $REPLY is
the sort key (the original name is still emitted).
quals: QualArenaThe faithful glob.c struct qual representation of alternatives,
built at parse end (additive — the enum is kept for now). AND-chain
via next, alternatives via or, per-node sense/range/amc/
units/sdata. The convergence target: check_qualifiers walks
THIS via insert() semantics (glob.c:392-419), and the enum is
eventually deleted.
first: Option<i32>§last: Option<i32>§colon_mods: Option<String>§pre_words: Vec<String>§post_words: Vec<String>§mark_dirs: bool(M) qualifier — append / to directory entries in output.
Direct port of zsh/Src/glob.c:1557-1561 (case 'M'):
gf_markdirs = !(sense & 1) — set when the qualifier appears
without a ^ toggle. Stored per-qualifier-set rather than per
GlobOptions so a single glob call’s qualifier picks it up.
list_types: bool(T) qualifier — append type-char (ls -F style) to every entry.
Direct port of zsh/Src/glob.c:1562-1566 (case 'T').
nullglob: bool(N) qualifier — per-glob nullglob: empty result on no-match,
no error. Direct port of zsh/Src/glob.c:1567-1569 (case 'N'):
gf_nullglob = !(sense & 1) — set when (N) appears without
the ^ toggle.
globdots: bool(D) qualifier — include dotfiles in the glob result (override
the global globdots/dotglob option for this glob alone).
Direct port of zsh/Src/glob.c case ‘D’ which sets
gf_glob.dots = 1 for the duration of this glob expansion.
short_circuit: Option<i32>(YN) qualifier — short-circuit: limit number of matches to
at most N. Direct port of zsh/Src/glob.c:1579-1595 (case 'Y')
which sets the C shortcircuit int. The matcher should stop
after collecting N entries; the Rust port truncates after the
match walk completes (the optimization gain is the same in
the typical short-glob case). Bug #41 in docs/BUGS.md.
numsort: Option<bool>(n) qualifier — per-glob numeric sort. Direct port of
zsh/Src/glob.c:1575-1577 (case 'n': gf_numsort = !(sense & 1)).
Distinct from the o/O sort KEY n (= GS_NAME, lexical):
standalone (n) makes the name comparison NUMERIC (so *(n)
orders f2 before f10), OR’d with the global NUMERIC_GLOB_SORT
option at sort time (glob.c:947/983 gf_numsort ? SORTIT_NUMERICALLY : 0). None = not specified (fall back to
the global option); Some(true) = (n); Some(false) = (^n)
which OVERRIDES the global option to force lexical.
Trait Implementations§
Source§impl Clone for qualifier_set
impl Clone for qualifier_set
Source§fn clone(&self) -> qualifier_set
fn clone(&self) -> qualifier_set
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for qualifier_set
impl Debug for qualifier_set
Source§impl Default for qualifier_set
impl Default for qualifier_set
Source§fn default() -> qualifier_set
fn default() -> qualifier_set
Auto Trait Implementations§
impl Freeze for qualifier_set
impl RefUnwindSafe for qualifier_set
impl Send for qualifier_set
impl Sync for qualifier_set
impl Unpin for qualifier_set
impl UnsafeUnpin for qualifier_set
impl UnwindSafe for qualifier_set
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