[][src]Struct secc::SeccSender

pub struct SeccSender<T: Sync + Send + Clone> { /* fields omitted */ }

Sender side of the channel.

Methods

impl<T: Sync + Send + Clone> SeccSender<T>[src]

pub fn send(&self, message: T) -> Result<(), SeccErrors<T>>[src]

Sends a message, which will be moved into the channel. This function will either return an empty [std::Result::Ok] or an [std::Result::Err] containing the last message sent if something went wrong.

pub fn send_await_timeout(
    &self,
    message: T,
    timeout: Duration
) -> Result<(), SeccErrors<T>>
[src]

Send to the channel, awaiting capacity if necessary up to a given timeout. This function is semantically identical to SeccSender::send but simply waits for there to be space in the channel before sending.

pub fn send_await(&self, message: T) -> Result<(), SeccErrors<T>>[src]

Trait Implementations

impl<T: Sync + Send + Clone> SeccCoreOps<T> for SeccSender<T>[src]

impl<T: Send + Sync + Clone> Send for SeccSender<T>[src]

impl<T: Send + Sync + Clone> Sync for SeccSender<T>[src]

impl<T: Sync + Send + Clone> Clone for SeccSender<T>[src]

impl<T: Sync + Send + Clone> Debug for SeccSender<T>[src]

This function will write a debug string for the SeccSender but be warned that it will acquire the mutex lock to the send_ptrs to accomplish this so a deadlock could ensue if you have two threads asking for debug on both SeccSender and SeccReceiver, especially if they are doing so in a different order.

Auto Trait Implementations

impl<T> Unpin for SeccSender<T>

impl<T> !UnwindSafe for SeccSender<T>

impl<T> !RefUnwindSafe for SeccSender<T>

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]