[−][src]Struct secc::SeccSender
Sender side of the channel.
Methods
impl<T: Sync + Send> 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_ms: u16
) -> Result<(), SeccErrors<T>>
[src]
&self,
message: T,
timeout_ms: u16
) -> Result<(), SeccErrors<T>>
Send to the channel, awaiting capacity if necessary, with an optional timeout. This
function is semantically identical to SeccSender::send
but simply waits
for there to be space in the channel before sending. If the timeout is not provided this
function will wait forever for capacity.
pub fn send_await(&self, message: T) -> Result<(), SeccErrors<T>>
[src]
Trait Implementations
impl<T: Sync + Send> SeccCoreOps<T> for SeccSender<T>
[src]
fn core(&self) -> &SeccCore<T>
[src]
fn capacity(&self) -> usize
[src]
Returns the capacity of the channel.
fn awaited_messages(&self) -> usize
[src]
Count of the number of times receivers of this channel waited for messages.
fn awaited_capacity(&self) -> usize
[src]
Count of the number of times senders to the channel waited for capacity.
fn pending(&self) -> usize
[src]
Returns the number of items are in the channel currently without regard to cursors.
fn receivable(&self) -> usize
[src]
Number of messages in the channel that are available to be received. This will normally be the same as pending
unless there is a skip cursor active; in which case it may be smaller than pending or even 0. Read more
fn sent(&self) -> usize
[src]
Returns the total number of messages that have been sent to the channel.
fn received(&self) -> usize
[src]
Returns the total number of messages that have been received from the channel.
impl<T: Clone + Sync + Send> Clone for SeccSender<T>
[src]
fn clone(&self) -> SeccSender<T>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<T: Send + Sync> Send for SeccSender<T>
[src]
impl<T: Send + Sync> Sync for SeccSender<T>
[src]
Auto Trait Implementations
impl<T> Unpin for SeccSender<T>
impl<T> !RefUnwindSafe for SeccSender<T>
impl<T> !UnwindSafe for SeccSender<T>
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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> 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,