pub struct PresenceMap { /* private fields */ }Expand description
FAST presence map.
The presence map tracks which optional fields are present in a message. Bits are consumed in order as fields are decoded.
Implementations§
Source§impl PresenceMap
impl PresenceMap
Sourcepub fn new() -> PresenceMap
pub fn new() -> PresenceMap
Creates an empty presence map.
Sourcepub fn from_bits(bits: Vec<bool>) -> PresenceMap
pub fn from_bits(bits: Vec<bool>) -> PresenceMap
Creates a presence map from raw bits.
Sourcepub fn next_bit(&mut self) -> bool
pub fn next_bit(&mut self) -> bool
Returns the next bit from the presence map.
§Returns
true if the field is present, false otherwise.
Returns false if the map is exhausted.
Trait Implementations§
Source§impl Clone for PresenceMap
impl Clone for PresenceMap
Source§fn clone(&self) -> PresenceMap
fn clone(&self) -> PresenceMap
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 PresenceMap
impl Debug for PresenceMap
Source§impl Default for PresenceMap
impl Default for PresenceMap
Source§fn default() -> PresenceMap
fn default() -> PresenceMap
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PresenceMap
impl RefUnwindSafe for PresenceMap
impl Send for PresenceMap
impl Sync for PresenceMap
impl Unpin for PresenceMap
impl UnwindSafe for PresenceMap
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