Struct hopper::Sender
[−]
[src]
pub struct Sender<T> { /* fields omitted */ }
The 'send' side of hopper, similar to std::sync::mpsc::Sender
.
Methods
impl<T> Sender<T> where
T: Serialize,
[src]
T: Serialize,
pub fn flush(&mut self) -> Result<(), Error>
[src]
Attempt to flush any outstanding disk writes to the deque
This function will attempt to flush outstanding disk writes, which may fail if the in-memory buffer is full. This function is useful when traffic patterns are bursty, meaning a write may end up being stranded in limbo for a good spell.
pub fn send(&mut self, event: T) -> Result<(), (T, Error)>
[src]
Send a event into the queue
This function will fail with IO errors if the underlying queue files are
temporarily exhausted -- say, due to lack of file descriptors -- of with
Full if there is no more space in the in-memory buffer or on disk, as
per the max_disk_files
setting from
channel_with_explicit_capacity
. Ownership of the event will be
returned back to the caller on failure.
pub fn name(&self) -> &str
[src]
Return the sender's name
Trait Implementations
impl<T: Debug> Debug for Sender<T>
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<'de, T> Clone for Sender<T> where
T: Serialize + Deserialize<'de>,
[src]
T: Serialize + Deserialize<'de>,