pub struct MessageFlags(/* private fields */);Expand description
A compact bitfield of message flags.
Implementations§
Source§impl MessageFlags
impl MessageFlags
Sourcepub const FIRST_IN_BATCH: u32
pub const FIRST_IN_BATCH: u32
Flag: this message is the first element in a batch.
Sourcepub const LAST_IN_BATCH: u32
pub const LAST_IN_BATCH: u32
Flag: this message is the last element in a batch.
Sourcepub const DEGRADE_ALLOWED: u32
pub const DEGRADE_ALLOWED: u32
Flag: downstream may degrade this message (e.g., fast/low-precision path).
Sourcepub const fn first_in_batch(self) -> Self
pub const fn first_in_batch(self) -> Self
Return a copy with FIRST_IN_BATCH set.
Sourcepub const fn last_in_batch(self) -> Self
pub const fn last_in_batch(self) -> Self
Return a copy with LAST_IN_BATCH set.
Sourcepub const fn allow_degrade(self) -> Self
pub const fn allow_degrade(self) -> Self
Return a copy with DEGRADE_ALLOWED set.
Sourcepub const fn can_degrade(self) -> bool
pub const fn can_degrade(self) -> bool
true if DEGRADE_ALLOWED is set.
Trait Implementations§
Source§impl Clone for MessageFlags
impl Clone for MessageFlags
Source§fn clone(&self) -> MessageFlags
fn clone(&self) -> MessageFlags
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 Debug for MessageFlags
impl Debug for MessageFlags
Source§impl PartialEq for MessageFlags
impl PartialEq for MessageFlags
impl Copy for MessageFlags
impl Eq for MessageFlags
impl StructuralPartialEq for MessageFlags
Auto Trait Implementations§
impl Freeze for MessageFlags
impl RefUnwindSafe for MessageFlags
impl Send for MessageFlags
impl Sync for MessageFlags
impl Unpin for MessageFlags
impl UnsafeUnpin for MessageFlags
impl UnwindSafe for MessageFlags
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