pub enum qualifier {
Show 35 variants
IsRegular,
IsDirectory,
IsSymlink,
IsSocket,
IsFifo,
IsBlockDev,
IsCharDev,
IsDevice,
IsExecutable,
Readable,
Writable,
Executable,
WorldReadable,
WorldWritable,
WorldExecutable,
GroupReadable,
GroupWritable,
GroupExecutable,
Setuid,
Setgid,
Sticky,
OwnedByEuid,
OwnedByEgid,
OwnedByUid(u32),
OwnedByGid(u32),
Size {
value: u64,
unit: i32,
op: char,
},
Links {
value: u64,
op: char,
},
Atime {
value: i64,
unit: i32,
op: char,
},
Mtime {
value: i64,
unit: i32,
op: char,
},
Ctime {
value: i64,
unit: i32,
op: char,
},
Mode {
yes: u32,
no: u32,
},
Device(u64),
NonEmptyDir,
Eval(String),
ToggleSense,
}Expand description
A glob qualifier function
One glob qualifier — Rust-extension sum type. C uses a linked
list of struct qual (Src/zsh.h:140-152) with function-pointer
func per node; each variant here maps to one of C’s q* test
ported (qisreg, qisdir, qowner, qtime, …) at
Src/glob.c:1080-1340. The full struct qual port + per-test fn
dispatch lives in a later phase; this enum keeps the parsed-form
the per-match filter inside scanner() (line 500) needs.
Variants§
IsRegular
File type qualifiers
IsDirectory
IsSymlink
IsSocket
IsFifo
IsBlockDev
IsCharDev
IsDevice
IsExecutable
Readable
Permission qualifiers
Writable
Executable
WorldReadable
WorldWritable
WorldExecutable
GroupReadable
GroupWritable
GroupExecutable
Setuid
Setgid
Sticky
OwnedByEuid
Ownership qualifiers
OwnedByEgid
OwnedByUid(u32)
OwnedByGid(u32)
Size
Numeric qualifiers with range. unit is a TT_* i32
(glob.rs:99-113 / glob.c:121-133); op is the raw range
operator char (<, =, >) — mirrors C’s qgetnum which
returns the operator char and the handler switches inline.
Links
Atime
Mtime
Ctime
Mode
Mode specification
Device(u64)
Device number
NonEmptyDir
Non-empty directory
Eval(String)
Shell evaluation
ToggleSense
^ — toggle the running match sense for SUBSEQUENT qualifiers in
this list. C uses a running sense ^= 1 (Src/glob.c:1346) stored
per struct qual.sense; the enum can’t carry per-node sense, so a
marker in the list reproduces it: check_qualifier_list flips a
running sense bit on each marker and XORs it into later tests.
Fixes *(/^@) (dir AND not-symlink), *(.^x), etc.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for qualifier
impl RefUnwindSafe for qualifier
impl Send for qualifier
impl Sync for qualifier
impl Unpin for qualifier
impl UnsafeUnpin for qualifier
impl UnwindSafe for qualifier
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