Struct radiorust::sync::broadcast_bp::Sender
source · pub struct Sender<T> { /* private fields */ }
Expand description
Sender for broadcast channel with backpressure
Implementations
sourceimpl<T> Sender<T>
impl<T> Sender<T>
sourcepub async fn reserve(&self) -> Result<Reservation<'_, T>, RsrvError>
pub async fn reserve(&self) -> Result<Reservation<'_, T>, RsrvError>
Wait until ready to send
The returned Reservation
handle may be used to send a value
immediately (through Reservation::send
, which is not async
).
sourcepub fn try_reserve(&self) -> Result<Option<Reservation<'_, T>>, RsrvError>
pub fn try_reserve(&self) -> Result<Option<Reservation<'_, T>>, RsrvError>
Check if ready to send
The returned Reservation
handle may be used to send a value
immediately (through Reservation::send
, which is not async
).
This method returns Ok(None)
if it’s not possible to send a value
immediately.
Trait Implementations
Auto Trait Implementations
impl<T> !RefUnwindSafe for Sender<T>
impl<T> Send for Sender<T>where
T: Send,
impl<T> Sync for Sender<T>where
T: Send,
impl<T> Unpin for Sender<T>
impl<T> !UnwindSafe for Sender<T>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more