pub struct OwnedPermit<T> { /* private fields */ }
Expand description
An owned permit to send one value into the channel.
Implementations§
Source§impl<T> OwnedPermit<T>
impl<T> OwnedPermit<T>
Sourcepub fn send(self, elem: T) -> Sender<T>
pub fn send(self, elem: T) -> Sender<T>
Sends a value using the reserved capacity.
Since the capacity has been reserved beforehand, the value is sent immediately and the permit is consumed. This will succeed even if the channel has been closed.
Unlike Permit::send
, this method returns the Sender
from which
the OwnedPermit
was reserved.
Trait Implementations§
Source§impl<T> Debug for OwnedPermit<T>
impl<T> Debug for OwnedPermit<T>
Auto Trait Implementations§
impl<T> Freeze for OwnedPermit<T>
impl<T> !RefUnwindSafe for OwnedPermit<T>
impl<T> !Send for OwnedPermit<T>
impl<T> !Sync for OwnedPermit<T>
impl<T> Unpin for OwnedPermit<T>
impl<T> !UnwindSafe for OwnedPermit<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