Struct async_unsync::bounded::OwnedPermit
source · 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.