pub struct ShellSnapshot {Show 13 fields
pub working_dir: PathBuf,
pub directory_stack: Vec<PathBuf>,
pub last_exit_status: u8,
pub positional_parameters: Vec<String>,
pub variables: BTreeMap<String, SavedVariable>,
pub unset_variables: BTreeSet<String>,
pub functions: BTreeMap<String, SavedFunction>,
pub aliases: BTreeMap<String, String>,
pub traps: BTreeMap<String, String>,
pub set_options: BTreeMap<String, bool>,
pub shopt_options: BTreeMap<String, bool>,
pub disabled_builtins: BTreeSet<String>,
pub not_kept: Vec<NotKept>,
}Expand description
A shell’s state between two commands.
Fields§
§working_dir: PathBufThe working directory.
directory_stack: Vec<PathBuf>The directory stack of pushd and popd, without the working
directory.
last_exit_status: u8$?.
positional_parameters: Vec<String>$1 and on.
variables: BTreeMap<String, SavedVariable>Global variables, by name.
unset_variables: BTreeSet<String>Baseline names the shell no longer has.
functions: BTreeMap<String, SavedFunction>Functions, by name.
aliases: BTreeMap<String, String>Aliases: name to value.
traps: BTreeMap<String, String>Trap handlers: signal name, as trap -p prints it, to command text.
set_options: BTreeMap<String, bool>set -o options, by name.
shopt_options: BTreeMap<String, bool>shopt options, by name.
disabled_builtins: BTreeSet<String>Builtins turned off with enable -n.
not_kept: Vec<NotKept>State the snapshot could not copy.
Trait Implementations§
Source§impl Clone for ShellSnapshot
impl Clone for ShellSnapshot
Source§impl Debug for ShellSnapshot
impl Debug for ShellSnapshot
Source§impl Default for ShellSnapshot
impl Default for ShellSnapshot
impl Eq for ShellSnapshot
Source§impl PartialEq for ShellSnapshot
impl PartialEq for ShellSnapshot
impl StructuralPartialEq for ShellSnapshot
Auto Trait Implementations§
impl Freeze for ShellSnapshot
impl RefUnwindSafe for ShellSnapshot
impl Send for ShellSnapshot
impl Sync for ShellSnapshot
impl Unpin for ShellSnapshot
impl UnsafeUnpin for ShellSnapshot
impl UnwindSafe for ShellSnapshot
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
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,
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
Compare self to
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> ⓘ
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