#[non_exhaustive]pub enum Param<'a> {
Var(&'a str),
Positional(u32),
At,
Star,
Pound,
Status,
Pid,
Bang,
Dash,
}Expand description
A shell parameter reference.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Var(&'a str)
Named variable ($var).
Positional(u32)
Positional parameter ($1, $2, …).
At
$@ — all positional parameters (separate words).
Star
$* — all positional parameters (single word).
Pound
$# — number of positional parameters.
Status
$? — exit status of last command.
Pid
$$ — process ID.
Bang
$! — PID of last background process.
Dash
$- — current shell option flags.
Trait Implementations§
impl<'a> Copy for Param<'a>
impl<'a> Eq for Param<'a>
impl<'a> StructuralPartialEq for Param<'a>
Auto Trait Implementations§
impl<'a> Freeze for Param<'a>
impl<'a> RefUnwindSafe for Param<'a>
impl<'a> Send for Param<'a>
impl<'a> Sync for Param<'a>
impl<'a> Unpin for Param<'a>
impl<'a> UnsafeUnpin for Param<'a>
impl<'a> UnwindSafe for Param<'a>
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