pub struct AuditOperationFlags { /* private fields */ }Expand description
BACnetAuditOperationFlags — a bit string selecting audit operations
(Clause 21).
Bit positions 0 through 15 have the same meanings as the named
AuditOperation values. Positions 16 through 31 are currently undefined
and reserved for ASHRAE, so they must remain zero. Positions 32 through 63
are retained for proprietary operations.
Implementations§
Source§impl AuditOperationFlags
impl AuditOperationFlags
Sourcepub fn from_bits(bits: u64) -> Result<Self>
pub fn from_bits(bits: u64) -> Result<Self>
Construct from the bit-position-preserving representation.
Currently undefined ASHRAE-reserved positions 16 through 31 are rejected rather than masked.
Sourcepub const fn contains(self, operation: AuditOperation) -> bool
pub const fn contains(self, operation: AuditOperation) -> bool
Whether operation is selected.
Raw AuditOperation values above 63 are outside the production’s
representable range and therefore return false.
Sourcepub fn insert(&mut self, operation: AuditOperation) -> bool
pub fn insert(&mut self, operation: AuditOperation) -> bool
Select operation, returning false without mutation when its raw
value is outside the representable range 0 through 63.
Sourcepub fn remove(&mut self, operation: AuditOperation) -> bool
pub fn remove(&mut self, operation: AuditOperation) -> bool
Clear operation, returning false when its raw value is outside the
representable range 0 through 63.
Sourcepub fn iter(self) -> impl Iterator<Item = AuditOperation>
pub fn iter(self) -> impl Iterator<Item = AuditOperation>
Iterate selected operations in ascending bit-position order, including proprietary raw values.
Sourcepub fn from_bacnet(unused_bits: u8, data: &[u8]) -> Result<Self>
pub fn from_bacnet(unused_bits: u8, data: &[u8]) -> Result<Self>
Decode a Clause 20.2.10 BIT STRING payload.
data excludes the initial unused-bits octet. The decoder rejects
values wider than the 64 positions allowed by
BACnetAuditOperationFlags, invalid unused-bit counts, and nonzero
padding in the final octet.