pub enum ReceiveResult<E: UserEvent> {
Success(Option<E::Argument>),
Timeout,
}Expand description
Receiver poll return value.
Variants§
Success(Option<E::Argument>)
Success received one event message
Timeout
Receive event message timeout
Implementations§
Source§impl<E: UserEvent> ReceiveResult<E>
impl<E: UserEvent> ReceiveResult<E>
Sourcepub fn success(self) -> Result<Option<E::Argument>, CompleteQError>
pub fn success(self) -> Result<Option<E::Argument>, CompleteQError>
Convert ReceiveResult structure into Result<(),CompleteQError>
If timeout this method will return [Err(CompleteQError::Timeout)]
Sourcepub fn is_timeout(&self) -> bool
pub fn is_timeout(&self) -> bool
Helper method to detect if ReceiveResult enum is ReceiveResult::Timeout
Auto Trait Implementations§
impl<E> Freeze for ReceiveResult<E>
impl<E> RefUnwindSafe for ReceiveResult<E>
impl<E> Send for ReceiveResult<E>
impl<E> Sync for ReceiveResult<E>
impl<E> Unpin for ReceiveResult<E>
impl<E> UnwindSafe for ReceiveResult<E>
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