Trait UseChannel

Source
pub trait UseChannel {
    // Required method
    fn use_channel<T, C, F>(&mut self, key: Key, closure: C) -> Sender<T>
       where T: Send + 'static,
             C: FnOnce(Receiver<T>) -> F + 'static,
             F: Future<Output = ()>;
}

Required Methods§

Source

fn use_channel<T, C, F>(&mut self, key: Key, closure: C) -> Sender<T>
where T: Send + 'static, C: FnOnce(Receiver<T>) -> F + 'static, F: Future<Output = ()>,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<M> UseChannel for M
where M: UseAsync + UseReference + Link,