Struct conch_runtime::env::FnEnv [−][src]
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]
impl<N: Hash + Eq, F> FnEnv<N, F>Trait Implementations
impl<N: PartialEq + Hash + Eq, F: PartialEq> PartialEq for FnEnv<N, F>[src]
impl<N: PartialEq + Hash + Eq, F: PartialEq> PartialEq for FnEnv<N, F>fn eq(&self, other: &FnEnv<N, F>) -> bool[src]
fn eq(&self, other: &FnEnv<N, F>) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &FnEnv<N, F>) -> bool[src]
fn ne(&self, other: &FnEnv<N, F>) -> boolThis method tests for !=.
impl<N: Eq + Hash + Eq, F: Eq> Eq for FnEnv<N, F>[src]
impl<N: Eq + Hash + Eq, F: Eq> Eq for FnEnv<N, F>impl<N, F> Debug for FnEnv<N, F> where
N: Hash + Eq + Debug + Ord,
F: Debug, [src]
impl<N, F> Debug for FnEnv<N, F> where
N: Hash + Eq + Debug + Ord,
F: Debug, fn fmt(&self, fmt: &mut Formatter) -> Result[src]
fn fmt(&self, fmt: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl<N: Hash + Eq, F> Default for FnEnv<N, F>[src]
impl<N: Hash + Eq, F> Default for FnEnv<N, F>impl<N: Hash + Eq, F> Clone for FnEnv<N, F>[src]
impl<N: Hash + Eq, F> Clone for FnEnv<N, F>fn clone(&self) -> Self[src]
fn clone(&self) -> SelfReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl<N: Hash + Eq, F> SubEnvironment for FnEnv<N, F>[src]
impl<N: Hash + Eq, F> SubEnvironment for FnEnv<N, F>fn sub_env(&self) -> Self[src]
fn sub_env(&self) -> SelfCreate 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]
impl<N, F> FunctionEnvironment for FnEnv<N, F> where
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]
fn function(&self, name: &Self::FnName) -> Option<&Self::Fn>Get a particularly named function if it was registered.
fn set_function(&mut self, name: Self::FnName, func: Self::Fn)[src]
fn set_function(&mut self, name: Self::FnName, func: Self::Fn)Register a shell function with a given name.
fn has_function(&self, name: &Self::FnName) -> bool[src]
fn has_function(&self, name: &Self::FnName) -> boolCheck if a particularly named function was registered.
impl<N, F> UnsetFunctionEnvironment for FnEnv<N, F> where
N: Clone + Hash + Eq,
F: Clone, [src]
impl<N, F> UnsetFunctionEnvironment for FnEnv<N, F> where
N: Clone + Hash + Eq,
F: Clone, fn unset_function(&mut self, name: &Self::FnName)[src]
fn unset_function(&mut self, name: &Self::FnName)Removes the definition of a function if it was registered.