pub struct globdata {Show 15 fields
pub matches: Vec<gmatch>,
pub qualifiers: Option<qualifier_set>,
pub quals: Option<QualArena>,
pub pathbuf: String,
pub pathpos: usize,
pub matchct: i32,
pub pathbufsz: usize,
pub pathbufcwd: i32,
pub gf_nullglob: i32,
pub gf_markdirs: i32,
pub gf_noglobdots: i32,
pub gf_listtypes: i32,
pub gf_pre_words: Option<Vec<String>>,
pub gf_post_words: Option<Vec<String>>,
pub dot_prefix_verbatim: bool,
}Expand description
Main glob state — port of struct globdata from Src/glob.c:168.
C zsh has a single file-static static struct globdata curglobdata;
(glob.c:196) and accesses fields through a wall of #define macros
(matchsz/matchct/pathbuf/pathpos/quals/…) that all
resolve to curglobdata.gd_*. The Rust port collapses the
gd_matchsz/gd_matchct/gd_matchbuf/gd_matchptr quartet into
matches: Vec<GlobMatch> (the natural Rust shape) and folds the
gd_gf_* glob-flag bag into options: GlobOptions, but the
1:1 correspondence to struct globdata is otherwise faithful.
globdata — see fields for layout.
Fields§
§matches: Vec<gmatch>matches field.
qualifiers: Option<qualifier_set>qualifiers field.
quals: Option<QualArena>c:206 — quals (curglobdata.gd_quals): the struct qual list
that insert() walks per candidate file. Arena-backed port of
the C pointer list; None when the glob has no qualifiers.
pathbuf: String§pathpos: usize§matchct: i32§pathbufsz: usize§pathbufcwd: i32§gf_nullglob: i32§gf_markdirs: i32§gf_noglobdots: i32§gf_listtypes: i32§gf_pre_words: Option<Vec<String>>§gf_post_words: Option<Vec<String>>§dot_prefix_verbatim: boolThe pattern’s path text starts with a literal ./, so every match
path is the pathbuf text verbatim (c:424 dyncat(pathbuf, news)) and
carries no scanner-added ./ for glob_emit_path to strip.
Implementations§
Auto Trait Implementations§
impl Freeze for globdata
impl RefUnwindSafe for globdata
impl Send for globdata
impl Sync for globdata
impl Unpin for globdata
impl UnsafeUnpin for globdata
impl UnwindSafe for globdata
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