pub struct Scope { /* private fields */ }Implementations
sourceimpl Scope
impl Scope
pub fn new() -> Scope
pub fn get_command(&self, name: &str) -> Option<Command>
pub fn get_aliases(&self) -> IndexMap<String, Vec<Spanned<String>>>
pub fn get_commands(&self) -> IndexMap<String, Signature>
pub fn get_commands_info(&self) -> IndexMap<String, Command>
pub fn get_variable_names(&self) -> Vec<String>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
pub fn get_vars(&self) -> IndexMap<String, Value>
pub fn get_aliases_with_name(
&self,
name: &str
) -> Option<Vec<Vec<Spanned<String>>>>
pub fn get_custom_commands_with_name(
&self,
name: &str
) -> Option<Vec<Arc<Block>>>
pub fn add_command(&self, name: String, command: Command)
pub fn get_alias_names(&self) -> Vec<String>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
pub fn get_command_names(&self) -> Vec<String>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn has_command(&self, name: &str) -> bool
pub fn has_custom_command(&self, name: &str) -> bool
pub fn has_alias(&self, name: &str) -> bool
pub fn expect_command(&self, name: &str) -> Result<Command, ShellError>
pub fn get_env_vars(&self) -> IndexMap<String, String>
pub fn get_env(&self, name: &str) -> Option<String>
pub fn get_var(&self, name: &str) -> Option<Value>
pub fn add_var(&self, name: impl Into<String>, value: Value)
pub fn add_vars(&self, vars: &IndexMap<String, Value>)
pub fn add_env_var(&self, name: impl Into<String>, value: impl Into<EnvVar>)
pub fn remove_env_var(&self, name: impl Into<String>) -> Option<String>
pub fn add_env(&self, env_vars: IndexMap<String, EnvVar>)
pub fn add_env_to_base(&self, env_vars: IndexMap<String, EnvVar>)
pub fn add_env_var_to_base(
&self,
name: impl Into<String>,
value: impl Into<EnvVar>
)
pub fn set_exit_scripts(&self, scripts: Vec<String>)
pub fn enter_scope_with_tag(&self, tag: String)
pub fn exit_scope_with_tag(&self, tag: &str)
pub fn get_exitscripts_of_frame_with_tag(
&self,
tag: &str
) -> Option<Vec<String>>
pub fn get_frame_with_tag(&self, tag: &str) -> Option<ScopeFrame>
pub fn update_frame_with_tag(
&self,
frame: ScopeFrame,
tag: &str
) -> Result<(), ShellError>
Trait Implementations
sourceimpl ParserScope for Scope
impl ParserScope for Scope
fn get_signature(&self, name: &str) -> Option<Signature>
fn has_signature(&self, name: &str) -> bool
fn add_definition(&self, block: Arc<Block>)
fn get_definitions(&self) -> Vec<Arc<Block>>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
fn get_alias(&self, name: &str) -> Option<Vec<Spanned<String>>>
fn add_alias(&self, name: &str, replacement: Vec<Spanned<String>>)
fn remove_alias(&self, name: &str)
fn enter_scope(&self)
fn exit_scope(&self)
Auto Trait Implementations
impl !RefUnwindSafe for Scope
impl Send for Scope
impl Sync for Scope
impl Unpin for Scope
impl !UnwindSafe for Scope
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> SpannedItem for T
impl<T> SpannedItem for T
sourceimpl<T> TaggedItem for T
impl<T> TaggedItem for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more