pub struct CompleteQ<E: UserEvent> { /* private fields */ }Expand description
CompleteQ structure is a central scheduler for certain types of completion events
The generic parameter E represents a user-defined event type
Implementations§
Source§impl<E> CompleteQ<E>where
E: 'static + UserEvent,
impl<E> CompleteQ<E>where
E: 'static + UserEvent,
pub fn new() -> Self
pub fn cancel_all(&self)
pub fn complete_one( &self, event_id: E::ID, event_arg: E::Argument, ) -> EventSend<E> ⓘ
Sourcepub fn wait_for(
&self,
event_id: E::ID,
max_len: usize,
) -> EventReceiver<E, Timeout> ⓘ
pub fn wait_for( &self, event_id: E::ID, max_len: usize, ) -> EventReceiver<E, Timeout> ⓘ
Create a new event receiver with provide event_id
Sourcepub fn wait_for_timeout<T: TimerWithContext>(
&self,
event_id: E::ID,
max_len: usize,
timeout: Duration,
) -> EventReceiver<E, T> ⓘ
pub fn wait_for_timeout<T: TimerWithContext>( &self, event_id: E::ID, max_len: usize, timeout: Duration, ) -> EventReceiver<E, T> ⓘ
wait_for operation with timeout
pub fn wait_for_timeout_with_context<T: TimerWithContext, C>( &self, event_id: E::ID, max_len: usize, timeout: Duration, context: C, ) -> EventReceiver<E, T> ⓘ
pub fn wait_for_with_timer<T: Timer>( &self, event_id: E::ID, max_len: usize, timer: T, ) -> EventReceiver<E, T> ⓘ
Source§impl<E> CompleteQ<E>where
E: 'static + AutoIncEvent,
impl<E> CompleteQ<E>where
E: 'static + AutoIncEvent,
Sourcepub fn wait_one(&mut self, max_len: usize) -> EventReceiver<E, Timeout> ⓘ
pub fn wait_one(&mut self, max_len: usize) -> EventReceiver<E, Timeout> ⓘ
Create a new event receiver with automatic generate event_id
pub fn wait_one_with_timer<T: Timer>( &mut self, max_len: usize, timer: T, ) -> EventReceiver<E, T> ⓘ
pub fn wait_one_timeout<T: Timer>( &mut self, max_len: usize, duration: Duration, ) -> EventReceiver<E, T> ⓘ
pub fn wait_one_timeout_with_context<T: TimerWithContext, C>( &mut self, max_len: usize, duration: Duration, context: C, ) -> EventReceiver<E, T> ⓘ
Trait Implementations§
Auto Trait Implementations§
impl<E> Freeze for CompleteQ<E>where
E: Freeze,
impl<E> RefUnwindSafe for CompleteQ<E>where
E: RefUnwindSafe,
impl<E> Send for CompleteQ<E>where
E: Send,
impl<E> Sync for CompleteQ<E>where
E: Sync,
impl<E> Unpin for CompleteQ<E>where
E: Unpin,
impl<E> UnwindSafe for CompleteQ<E>where
E: UnwindSafe,
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