pub enum BashVar {
Local(String),
Global(String),
Env(String),
Readonly(String),
Integer(String),
Array(String),
AssocArray(String),
NameRef(String),
}Expand description
Bash variable kinds, classified by scope / export semantics.
Variants§
Local(String)
Regular local (function-scoped) variable: local name
Global(String)
Script-global variable: plain assignment at top level
Env(String)
Exported environment variable: export NAME=...
Readonly(String)
Read-only variable: readonly NAME=...
Integer(String)
Integer variable: declare -i NAME
Array(String)
Indexed array: declare -a NAME
AssocArray(String)
Associative array: declare -A NAME
NameRef(String)
Name-ref variable (Bash 4.3+): declare -n NAME
Implementations§
Trait Implementations§
impl Eq for BashVar
impl StructuralPartialEq for BashVar
Auto Trait Implementations§
impl Freeze for BashVar
impl RefUnwindSafe for BashVar
impl Send for BashVar
impl Sync for BashVar
impl Unpin for BashVar
impl UnsafeUnpin for BashVar
impl UnwindSafe for BashVar
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