pub enum Command {
Show {
symbolic: bool,
},
Set(Vec<Clause>),
}Expand description
Interpretation of command-line arguments that determine the behavior of the
umask built-in
Variants§
Implementations§
Source§impl Command
impl Command
Sourcepub fn set_from_raw_mask(mask: u16) -> Self
pub fn set_from_raw_mask(mask: u16) -> Self
Creates a Command::Set variant from a raw mask.
This is a convenience method for creating a Command::Set variant from
a raw mask. The result contains a single clause that sets the mask to
the given value for all bits.
Sourcepub fn execute<S: Umask>(&self, env: &mut Env<S>) -> String
pub fn execute<S: Umask>(&self, env: &mut Env<S>) -> String
Executes the umask built-in.
Regardless of the command type, this function performs the following steps:
- Obtain the current mask from the environment. (
Umask::umask) - Compute a new mask to be set. (
eval::new_mask) - Set the new mask. (
Umask::umask)
Returns the string that should be printed to the standard output.
Trait Implementations§
impl Eq for Command
impl StructuralPartialEq for Command
Auto Trait Implementations§
impl Freeze for Command
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnsafeUnpin for Command
impl UnwindSafe for Command
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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