channel-sender 0.4.0

Channel Sender
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use dyn_clone::{clone_trait_object, DynClone};

use crate::error::SendError;

//
pub trait Sender<T> {
    fn send(&self, t: T) -> Result<(), SendError<T>>;
}

pub trait CloneableSender<T>: DynClone {
    fn send(&self, t: T) -> Result<(), SendError<T>>;
}
clone_trait_object!(<T> CloneableSender<T>);