Struct tic::Sender
[−]
[src]
pub struct Sender<T> { /* fields omitted */ }
a Sender is used to push Sample
s to the Receiver
it is clonable for sharing between threads
Methods
impl<T: Hash + Eq + Send + Clone> Sender<T>
[src]
fn new(
rx_queue: Arc<Queue<Vec<Sample<T>>>>,
data_tx: SyncSender<Vec<Sample<T>>>,
control_tx: SyncSender<ControlMessage<T>>,
batch_size: usize
) -> Sender<T>
[src]
rx_queue: Arc<Queue<Vec<Sample<T>>>>,
data_tx: SyncSender<Vec<Sample<T>>>,
control_tx: SyncSender<ControlMessage<T>>,
batch_size: usize
) -> Sender<T>
create a new Sender
for use in client threads
fn send(&mut self, sample: Sample<T>) -> Result<(), Error>
[src]
a function to send a Sample
to the Receiver
fn add_interest(&mut self, interest: Interest<T>)
[src]
register an Interest
fn remove_interest(&mut self, interest: Interest<T>)
[src]
de-register an Interest
fn set_batch_size(&mut self, batch_size: usize)
[src]
a function to change the batch size of the Sender
fn try_send(&mut self, sample: Sample<T>) -> Result<(), Sample<T>>
[src]
mock try_send Sample
to the Receiver