[−][src]Struct secc::SeccSender
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]
&self,
message: T,
timeout: Duration
) -> Result<(), SeccErrors<T>>
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]
fn core(&self) -> &SeccCore<T>
[src]
fn capacity(&self) -> usize
[src]
fn awaited_messages(&self) -> usize
[src]
fn awaited_capacity(&self) -> usize
[src]
fn pending(&self) -> usize
[src]
fn receivable(&self) -> usize
[src]
fn sent(&self) -> usize
[src]
fn received(&self) -> usize
[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]
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[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]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,