pub struct Env<'a> {
pub inner: &'a mut Env,
pub last_command_subst_exit_status: Option<ExitStatus>,
pub will_split: bool,
}Expand description
Environment in which initial expansion is performed
This sturct extends yash_env::Env with some properties.
Fields§
§inner: &'a mut EnvMain part of the environment
last_command_subst_exit_status: Option<ExitStatus>Exit status of the last executed command substitution
This value is None by default.
When performing a command substitution during expansion, you must set
its exit status to this field.
will_split: boolWhether the expansion result will be subjected to field splitting.
This flag will affect the expansion of the $* special parameter.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Env<'a>
impl<'a> !RefUnwindSafe for Env<'a>
impl<'a> !Send for Env<'a>
impl<'a> !Sync for Env<'a>
impl<'a> Unpin for Env<'a>
impl<'a> !UnwindSafe for Env<'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
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