Struct futures_intrusive::channel::shared::GenericStateReceiver   
source · [−]pub struct GenericStateReceiver<MutexType, T> where
    MutexType: RawMutex,
    T: Clone + '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> GenericStateReceiver<MutexType, T> where
    MutexType: RawMutex + 'static,
    T: Clone, 
 
impl<MutexType, T> GenericStateReceiver<MutexType, T> where
    MutexType: RawMutex + 'static,
    T: Clone, 
sourcepub fn receive(&self, state_id: StateId) -> StateReceiveFuture<MutexType, T>ⓘNotable traits for StateReceiveFuture<MutexType, T>impl<MutexType, T> Future for StateReceiveFuture<MutexType, T>    type Output = Option<(StateId, T)>;
 
pub fn receive(&self, state_id: StateId) -> StateReceiveFuture<MutexType, T>ⓘNotable traits for StateReceiveFuture<MutexType, T>impl<MutexType, T> Future for StateReceiveFuture<MutexType, T>    type Output = Option<(StateId, T)>;
Returns a future that gets fulfilled when a value is written to the channel
or the channel is closed.
state_id specifies the minimum state ID that should be retrieved
by the receive operation.
The returned StateReceiveFuture will get fulfilled with the
retrieved value as well as the StateId which is required to retrieve
the following state
sourcepub fn try_receive(&self, state_id: StateId) -> Option<(StateId, T)>
 
pub fn try_receive(&self, state_id: StateId) -> Option<(StateId, T)>
Attempt to retrieve a value whose StateId is greater than the one provided.
Returns None if no value is found in the channel, or if the current StateId
of the value is less or equal to the one provided.
Trait Implementations
sourceimpl<MutexType, T> Clone for GenericStateReceiver<MutexType, T> where
    MutexType: RawMutex,
    T: Clone, 
 
impl<MutexType, T> Clone for GenericStateReceiver<MutexType, T> where
    MutexType: RawMutex,
    T: Clone, 
sourceimpl<MutexType, T> Debug for GenericStateReceiver<MutexType, T> where
    MutexType: RawMutex,
    T: Clone, 
 
impl<MutexType, T> Debug for GenericStateReceiver<MutexType, T> where
    MutexType: RawMutex,
    T: Clone, 
Auto Trait Implementations
impl<MutexType, T> !RefUnwindSafe for GenericStateReceiver<MutexType, T>
impl<MutexType, T> Send for GenericStateReceiver<MutexType, T> where
    MutexType: Send + Sync,
    T: Send, 
impl<MutexType, T> Sync for GenericStateReceiver<MutexType, T> where
    MutexType: Send + Sync,
    T: Send, 
impl<MutexType, T> Unpin for GenericStateReceiver<MutexType, T>
impl<MutexType, T> !UnwindSafe for GenericStateReceiver<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