#[non_exhaustive]pub enum Presence {
Mask {
field: String,
mask: u64,
},
Flag {
field: String,
},
Bit,
Remaining,
}Expand description
When an optional field is present.
Encode sets the presence from whether the field is Some.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Mask
When field & mask != 0.
Flag
When the bool field is true.
Bit
When an unnamed bit just before the field is set. Bit-addressed messages only.
Remaining
When the body has bytes left. Must be the last field.
Trait Implementations§
impl Eq for Presence
impl StructuralPartialEq for Presence
Auto Trait Implementations§
impl Freeze for Presence
impl RefUnwindSafe for Presence
impl Send for Presence
impl Sync for Presence
impl Unpin for Presence
impl UnsafeUnpin for Presence
impl UnwindSafe for Presence
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