pub enum UnaryPredicate {
Show 24 variants
FileExists,
FileExistsAndIsBlockSpecialFile,
FileExistsAndIsCharSpecialFile,
FileExistsAndIsDir,
FileExistsAndIsRegularFile,
FileExistsAndIsSetgid,
FileExistsAndIsSymlink,
FileExistsAndHasStickyBit,
FileExistsAndIsFifo,
FileExistsAndIsReadable,
FileExistsAndIsNotZeroLength,
FdIsOpenTerminal,
FileExistsAndIsSetuid,
FileExistsAndIsWritable,
FileExistsAndIsExecutable,
FileExistsAndOwnedByEffectiveGroupId,
FileExistsAndModifiedSinceLastRead,
FileExistsAndOwnedByEffectiveUserId,
FileExistsAndIsSocket,
ShellOptionEnabled,
ShellVariableIsSetAndAssigned,
ShellVariableIsSetAndNameRef,
StringHasZeroLength,
StringHasNonZeroLength,
}Expand description
A unary predicate usable in an extended test expression.
Variants§
FileExists
Computes if the operand is a path to an existing file.
FileExistsAndIsBlockSpecialFile
Computes if the operand is a path to an existing block device file.
FileExistsAndIsCharSpecialFile
Computes if the operand is a path to an existing character device file.
FileExistsAndIsDir
Computes if the operand is a path to an existing directory.
FileExistsAndIsRegularFile
Computes if the operand is a path to an existing regular file.
FileExistsAndIsSetgid
Computes if the operand is a path to an existing file with the setgid bit set.
FileExistsAndIsSymlink
Computes if the operand is a path to an existing symbolic link.
FileExistsAndHasStickyBit
Computes if the operand is a path to an existing file with the sticky bit set.
FileExistsAndIsFifo
Computes if the operand is a path to an existing FIFO file.
FileExistsAndIsReadable
Computes if the operand is a path to an existing file that is readable.
FileExistsAndIsNotZeroLength
Computes if the operand is a path to an existing file with a non-zero length.
FdIsOpenTerminal
Computes if the operand is a file descriptor that is an open terminal.
FileExistsAndIsSetuid
Computes if the operand is a path to an existing file with the setuid bit set.
FileExistsAndIsWritable
Computes if the operand is a path to an existing file that is writable.
FileExistsAndIsExecutable
Computes if the operand is a path to an existing file that is executable.
FileExistsAndOwnedByEffectiveGroupId
Computes if the operand is a path to an existing file owned by the current context’s effective group ID.
FileExistsAndModifiedSinceLastRead
Computes if the operand is a path to an existing file that has been modified since last being read.
FileExistsAndOwnedByEffectiveUserId
Computes if the operand is a path to an existing file owned by the current context’s effective user ID.
FileExistsAndIsSocket
Computes if the operand is a path to an existing socket file.
ShellOptionEnabled
Computes if the operand is a ‘set -o’ option that is enabled.
ShellVariableIsSetAndAssigned
Computes if the operand names a shell variable that is set and assigned a value.
ShellVariableIsSetAndNameRef
Computes if the operand names a shell variable that is set and of nameref type.
StringHasZeroLength
Computes if the operand is a string with zero length.
StringHasNonZeroLength
Computes if the operand is a string with non-zero length.
Trait Implementations§
Source§impl<'arbitrary> Arbitrary<'arbitrary> for UnaryPredicate
Available on crate feature arbitrary only.
impl<'arbitrary> Arbitrary<'arbitrary> for UnaryPredicate
arbitrary only.Source§fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
Self from the given unstructured data. Read moreSource§fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
Self from the entirety of the given
unstructured data. Read moreSource§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Unstructured this type
needs to construct itself. Read moreSource§fn try_size_hint(
depth: usize,
) -> Result<(usize, Option<usize>), MaxRecursionReached>
fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>
Unstructured this type
needs to construct itself. Read moreSource§impl Clone for UnaryPredicate
impl Clone for UnaryPredicate
Source§impl Debug for UnaryPredicate
impl Debug for UnaryPredicate
Source§impl<'de> Deserialize<'de> for UnaryPredicate
Available on crate features serde only.
impl<'de> Deserialize<'de> for UnaryPredicate
serde only.Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for UnaryPredicate
impl Display for UnaryPredicate
impl Eq for UnaryPredicate
serde only.Source§impl PartialEq for UnaryPredicate
Available on crate features serde only.
impl PartialEq for UnaryPredicate
serde only.Source§impl Serialize for UnaryPredicate
Available on crate features serde only.
impl Serialize for UnaryPredicate
serde only.impl StructuralPartialEq for UnaryPredicate
serde only.Auto Trait Implementations§
impl Freeze for UnaryPredicate
impl RefUnwindSafe for UnaryPredicate
impl Send for UnaryPredicate
impl Sync for UnaryPredicate
impl Unpin for UnaryPredicate
impl UnsafeUnpin for UnaryPredicate
impl UnwindSafe for UnaryPredicate
Blanket Implementations§
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.