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 Clone for UnaryPredicate
impl Clone for UnaryPredicate
Source§fn clone(&self) -> UnaryPredicate
fn clone(&self) -> UnaryPredicate
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 UnaryPredicate
impl Debug for UnaryPredicate
Source§impl<'de> Deserialize<'de> for UnaryPredicate
impl<'de> Deserialize<'de> for UnaryPredicate
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<UnaryPredicate, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<UnaryPredicate, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Display for UnaryPredicate
impl Display for UnaryPredicate
impl Eq for UnaryPredicate
Source§impl PartialEq for UnaryPredicate
impl PartialEq for UnaryPredicate
Source§impl Serialize for UnaryPredicate
impl Serialize for UnaryPredicate
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for UnaryPredicate
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.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