Struct futures_intrusive::channel::shared::GenericOneshotReceiver   
source · [−]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
sourceimpl<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>ⓘNotable traits for ChannelReceiveFuture<MutexType, T>impl<MutexType, T> Future for ChannelReceiveFuture<MutexType, T>    type Output = Option<T>;
 
pub fn receive(&self) -> ChannelReceiveFuture<MutexType, T>ⓘNotable traits for ChannelReceiveFuture<MutexType, T>impl<MutexType, T> Future for ChannelReceiveFuture<MutexType, T>    type Output = Option<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
sourceimpl<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> !RefUnwindSafe for GenericOneshotReceiver<MutexType, T>
impl<MutexType, T> Send for GenericOneshotReceiver<MutexType, T> where
    MutexType: Send + Sync,
    T: Send, 
impl<MutexType, T> Sync for GenericOneshotReceiver<MutexType, T> where
    MutexType: Send + Sync,
    T: Send, 
impl<MutexType, T> Unpin for GenericOneshotReceiver<MutexType, T>
impl<MutexType, T> !UnwindSafe for GenericOneshotReceiver<MutexType, T>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
    T: ?Sized, 
 
impl<T> BorrowMut<T> for T where
    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