[][src]Trait dispatchtable::Dispatch

pub trait Dispatch<K, P: ?Sized, R> where
    K: Eq + Hash
{ fn into_vec(self) -> Vec<(K, Box<dyn DispatchFunction<P, R>>)>;
fn remove<Q: ?Sized>(&mut self, key: &Q)
    where
        K: Borrow<Q>,
        Q: Eq + Hash
;
fn insert(&mut self, key: K, item: Box<dyn DispatchFunction<P, R>>);
fn contains_key<Q: ?Sized>(&self, key: &Q) -> bool
    where
        K: Borrow<Q>,
        Q: Eq + Hash
;
fn get<Q: ?Sized>(
        &self,
        key: &Q
    ) -> Option<&Box<dyn DispatchFunction<P, R>>>
    where
        K: Borrow<Q>,
        Q: Eq + Hash
;
fn len(&self) -> usize; fn call<Q: ?Sized>(&self, key: &Q, params: &P) -> Option<R>
    where
        K: Borrow<Q>,
        Q: Eq + Hash
, { ... } }

Required methods

fn into_vec(self) -> Vec<(K, Box<dyn DispatchFunction<P, R>>)>

fn remove<Q: ?Sized>(&mut self, key: &Q) where
    K: Borrow<Q>,
    Q: Eq + Hash

fn insert(&mut self, key: K, item: Box<dyn DispatchFunction<P, R>>)

fn contains_key<Q: ?Sized>(&self, key: &Q) -> bool where
    K: Borrow<Q>,
    Q: Eq + Hash

fn get<Q: ?Sized>(&self, key: &Q) -> Option<&Box<dyn DispatchFunction<P, R>>> where
    K: Borrow<Q>,
    Q: Eq + Hash

fn len(&self) -> usize

Loading content...

Provided methods

fn call<Q: ?Sized>(&self, key: &Q, params: &P) -> Option<R> where
    K: Borrow<Q>,
    Q: Eq + Hash

Loading content...

Implementors

impl<K, P: ?Sized, R> Dispatcher<K, P, R> for DispatchTable<K, P, R> where
    K: Hash + Eq
[src]

Loading content...