pub struct Sender<T> { /* private fields */ }Implementations§
Source§impl<T> Sender<T>
impl<T> Sender<T>
Sourcepub async fn reserve(&self, bytes: usize) -> Result<Permit<'_, T>, Closed>
pub async fn reserve(&self, bytes: usize) -> Result<Permit<'_, T>, Closed>
Reserve a slot for an item of bytes bytes. Waits for both limits.
Items larger than the whole budget are admitted alone (the budget is clamped) so a
single oversized row cannot deadlock the pipeline.
pub fn inflight_items(&self) -> u64
pub fn available_bytes(&self) -> usize
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Sender<T>
impl<T> RefUnwindSafe for Sender<T>
impl<T> Send for Sender<T>
impl<T> Sync for Sender<T>
impl<T> Unpin for Sender<T>
impl<T> UnsafeUnpin for Sender<T>
impl<T> UnwindSafe for Sender<T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more