Struct nu_engine::Scope[][src]

pub struct Scope { /* fields omitted */ }

Implementations

impl Scope[src]

pub fn new() -> Scope[src]

pub fn get_command(&self, name: &str) -> Option<Command>[src]

pub fn get_aliases(&self) -> IndexMap<String, Vec<Spanned<String>>>[src]

pub fn get_commands(&self) -> IndexMap<String, Signature>[src]

pub fn get_vars(&self) -> IndexMap<String, Value>[src]

pub fn get_aliases_with_name(
    &self,
    name: &str
) -> Option<Vec<Vec<Spanned<String>>>>
[src]

pub fn get_custom_commands_with_name(
    &self,
    name: &str
) -> Option<Vec<Arc<Block>>>
[src]

pub fn add_command(&self, name: String, command: Command)[src]

pub fn get_alias_names(&self) -> Vec<String>[src]

pub fn get_command_names(&self) -> Vec<String>[src]

pub fn len(&self) -> usize[src]

pub fn is_empty(&self) -> bool[src]

pub fn has_command(&self, name: &str) -> bool[src]

pub fn has_custom_command(&self, name: &str) -> bool[src]

pub fn has_alias(&self, name: &str) -> bool[src]

pub fn expect_command(&self, name: &str) -> Result<Command, ShellError>[src]

pub fn get_env_vars(&self) -> IndexMap<String, String>[src]

pub fn get_env(&self, name: &str) -> Option<String>[src]

pub fn get_var(&self, name: &str) -> Option<Value>[src]

pub fn add_var(&self, name: impl Into<String>, value: Value)[src]

pub fn add_vars(&self, vars: &IndexMap<String, Value>)[src]

pub fn add_env_var(&self, name: impl Into<String>, value: String)[src]

pub fn add_env(&self, env_vars: IndexMap<String, String>)[src]

pub fn add_env_to_base(&self, env_vars: IndexMap<String, String>)[src]

pub fn add_env_var_to_base(&self, name: impl Into<String>, value: String)[src]

pub fn set_exit_scripts(&self, scripts: Vec<String>)[src]

pub fn enter_scope_with_tag(&self, tag: String)[src]

pub fn exit_scope_with_tag(&self, tag: &str)[src]

pub fn get_exitscripts_of_frame_with_tag(
    &self,
    tag: &str
) -> Option<Vec<String>>
[src]

pub fn get_frame_with_tag(&self, tag: &str) -> Option<ScopeFrame>[src]

pub fn update_frame_with_tag(
    &self,
    frame: ScopeFrame,
    tag: &str
) -> Result<(), ShellError>
[src]

Trait Implementations

impl Clone for Scope[src]

fn clone(&self) -> Scope[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for Scope[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl Default for Scope[src]

fn default() -> Self[src]

Returns the “default value” for a type. Read more

impl ParserScope for Scope[src]

fn get_signature(&self, name: &str) -> Option<Signature>[src]

fn has_signature(&self, name: &str) -> bool[src]

fn add_definition(&self, block: Arc<Block>)[src]

fn get_definitions(&self) -> Vec<Arc<Block>>[src]

fn get_alias(&self, name: &str) -> Option<Vec<Spanned<String>>>[src]

fn add_alias(&self, name: &str, replacement: Vec<Spanned<String>>)[src]

fn enter_scope(&self)[src]

fn exit_scope(&self)[src]

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> Pointable for T

pub const ALIGN: usize

The alignment of pointer.

type Init = T

The type for initializers.

pub unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more

pub unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more

pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more

pub unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> SpannedItem for T[src]

fn spanned(self, span: impl Into<Span>) -> Spanned<Self>[src]

Converts a value into a Spanned value

fn spanned_unknown(self) -> Spanned<Self>[src]

Converts a value into a Spanned value, using an unknown Span

impl<T> TaggedItem for T[src]

fn tagged(self, tag: impl Into<Tag>) -> Tagged<Self>[src]

fn tagged_unknown(self) -> Tagged<Self>[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

pub fn vzip(self) -> V