pub enum ReadResult<T> {
Ok(T),
NotReady,
Overrun,
}Expand description
Result of attempting to read from the MCache.
Variants§
Ok(T)
Successfully read the data.
NotReady
The sequence number has not been published yet.
Overrun
The consumer was too slow and the slot was overwritten.
Implementations§
Source§impl<T> ReadResult<T>
impl<T> ReadResult<T>
Sourcepub fn is_not_ready(&self) -> bool
pub fn is_not_ready(&self) -> bool
Returns true if the result is NotReady.
Sourcepub fn is_overrun(&self) -> bool
pub fn is_overrun(&self) -> bool
Returns true if the result is Overrun.
Trait Implementations§
Source§impl<T: Clone> Clone for ReadResult<T>
impl<T: Clone> Clone for ReadResult<T>
Source§fn clone(&self) -> ReadResult<T>
fn clone(&self) -> ReadResult<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T: Debug> Debug for ReadResult<T>
impl<T: Debug> Debug for ReadResult<T>
Source§impl<T: Debug> Display for ReadResult<T>
impl<T: Debug> Display for ReadResult<T>
Source§impl<T: PartialEq> PartialEq for ReadResult<T>
impl<T: PartialEq> PartialEq for ReadResult<T>
impl<T: Copy> Copy for ReadResult<T>
impl<T: Eq> Eq for ReadResult<T>
impl<T> StructuralPartialEq for ReadResult<T>
Auto Trait Implementations§
impl<T> Freeze for ReadResult<T>where
T: Freeze,
impl<T> RefUnwindSafe for ReadResult<T>where
T: RefUnwindSafe,
impl<T> Send for ReadResult<T>where
T: Send,
impl<T> Sync for ReadResult<T>where
T: Sync,
impl<T> Unpin for ReadResult<T>where
T: Unpin,
impl<T> UnwindSafe for ReadResult<T>where
T: 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