Trait conch_runtime::env::FunctionEnvironment
[−]
[src]
pub trait FunctionEnvironment { type FnName; type Fn; fn function(&self, name: &Self::FnName) -> Option<&Self::Fn>; fn set_function(&mut self, name: Self::FnName, func: Self::Fn); fn has_function(&self, name: &Self::FnName) -> bool { ... } }
An interface for setting and getting shell functions.
Associated Types
Required Methods
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)
Register a shell function with a given name.
Provided Methods
fn has_function(&self, name: &Self::FnName) -> bool
Check if a particularly named function was registered.
Implementations on Foreign Types
impl<'a, T: ?Sized + FunctionEnvironment> FunctionEnvironment for &'a mut T
[src]
Implementors
impl<A, IO, FD, L, V, EX, WD, N, ERR> FunctionEnvironment for Env<A, IO, FD, L, V, EX, WD, N, ERR> where
N: Hash + Eq + Clone, type FnName = N; type Fn = Rc<SpawnBoxed<Self, Error = ERR>>;impl<A, IO, FD, L, V, EX, WD, N, ERR> FunctionEnvironment for AtomicEnv<A, IO, FD, L, V, EX, WD, N, ERR> where
N: Hash + Eq + Clone, type FnName = N; type Fn = Arc<SpawnBoxed<Self, Error = ERR> + Send + Sync>;impl<N, F> FunctionEnvironment for FnEnv<N, F> where
N: Clone + Hash + Eq,
F: Clone, type FnName = N; type Fn = F;impl<N, F> FunctionEnvironment for AtomicFnEnv<N, F> where
N: Clone + Hash + Eq,
F: Clone, type FnName = N; type Fn = F;