Struct conch_runtime::env::FnEnv
[−]
[src]
pub struct FnEnv<N: Hash + Eq, F> { /* fields omitted */ }
An environment module for setting and getting shell functions.
Uses Rc
internally. For a possible Send
and Sync
implementation,
see env::atomic::FnEnv
.
Methods
impl<N: Hash + Eq, F> FnEnv<N, F>
[src]
Trait Implementations
impl<N: PartialEq + Hash + Eq, F: PartialEq> PartialEq for FnEnv<N, F>
[src]
fn eq(&self, __arg_0: &FnEnv<N, F>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &FnEnv<N, F>) -> bool
[src]
This method tests for !=
.
impl<N: Eq + Hash + Eq, F: Eq> Eq for FnEnv<N, F>
[src]
impl<N, F> Debug for FnEnv<N, F> where
N: Hash + Eq + Debug + Ord,
F: Debug,
[src]
N: Hash + Eq + Debug + Ord,
F: Debug,
impl<N: Hash + Eq, F> Default for FnEnv<N, F>
[src]
impl<N: Hash + Eq, F> Clone for FnEnv<N, F>
[src]
fn clone(&self) -> Self
[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<N: Hash + Eq, F> SubEnvironment for FnEnv<N, F>
[src]
fn sub_env(&self) -> Self
[src]
Create a new sub-environment, which starts out idential to its parent, but any changes on the new environment will not be reflected on the parent. Read more
impl<N, F> FunctionEnvironment for FnEnv<N, F> where
N: Clone + Hash + Eq,
F: Clone,
[src]
N: Clone + Hash + Eq,
F: Clone,
type FnName = N
The name to be associated with a function.
type Fn = F
The type of the function.
fn function(&self, name: &Self::FnName) -> Option<&Self::Fn>
[src]
Get a particularly named function if it was registered.
fn set_function(&mut self, name: Self::FnName, func: Self::Fn)
[src]
Register a shell function with a given name.
fn has_function(&self, name: &Self::FnName) -> bool
[src]
Check if a particularly named function was registered.
impl<N, F> UnsetFunctionEnvironment for FnEnv<N, F> where
N: Clone + Hash + Eq,
F: Clone,
[src]
N: Clone + Hash + Eq,
F: Clone,
fn unset_function(&mut self, name: &Self::FnName)
[src]
Removes the definition of a function if it was registered.