pub struct GenericOneshotReceiver<MutexType, T>where
MutexType: RawMutex,
T: 'static,{ /* private fields */ }
Expand description
The receiving side of a channel which can be used to exchange values between concurrent tasks.
Tasks can receive values from the channel through the receive
method.
The returned Future will get resolved when a value is sent into the channel.
Implementations§
Source§impl<MutexType, T> GenericOneshotReceiver<MutexType, T>where
MutexType: RawMutex + 'static,
impl<MutexType, T> GenericOneshotReceiver<MutexType, T>where
MutexType: RawMutex + 'static,
Sourcepub fn receive(&self) -> ChannelReceiveFuture<MutexType, T> ⓘ
pub fn receive(&self) -> ChannelReceiveFuture<MutexType, T> ⓘ
Returns a future that gets fulfilled when a value is written to the channel.
If the channels gets closed, the future will resolve to None
.
Trait Implementations§
Source§impl<MutexType, T> Debug for GenericOneshotReceiver<MutexType, T>where
MutexType: RawMutex,
impl<MutexType, T> Debug for GenericOneshotReceiver<MutexType, T>where
MutexType: RawMutex,
Auto Trait Implementations§
impl<MutexType, T> Freeze for GenericOneshotReceiver<MutexType, T>
impl<MutexType, T> !RefUnwindSafe for GenericOneshotReceiver<MutexType, T>
impl<MutexType, T> Send for GenericOneshotReceiver<MutexType, T>
impl<MutexType, T> Sync for GenericOneshotReceiver<MutexType, T>
impl<MutexType, T> Unpin for GenericOneshotReceiver<MutexType, T>
impl<MutexType, T> !UnwindSafe for GenericOneshotReceiver<MutexType, 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