pub struct ServicesSupported { /* private fields */ }Expand description
BACnetServicesSupported — the protocol-services-supported bit string,
one bit per protocol service (Clause 21).
Stored as a u64 bitset: bit N is set iff ServiceSupported value N
is supported. protocol-services-supported is a closed enumeration whose
highest defined bit is 48 (with no vendor-proprietary range), so a u64
covers every standard service with headroom. Any nonstandard bit ≥ 64 — a
protocol violation — is ignored on decode. The public API still yields named
ServiceSupported values, and Debug prints names, never a raw number.
Implementations§
Source§impl ServicesSupported
impl ServicesSupported
Sourcepub fn from_bacnet(data: &[u8]) -> Self
pub fn from_bacnet(data: &[u8]) -> Self
Decode a bit-string payload (the data of PropertyValue::BitString)
into the bitset of services it advertises.
Sourcepub fn contains(&self, service: ServiceSupported) -> bool
pub fn contains(&self, service: ServiceSupported) -> bool
Whether service is marked supported.
Sourcepub fn iter(&self) -> impl Iterator<Item = ServiceSupported> + '_
pub fn iter(&self) -> impl Iterator<Item = ServiceSupported> + '_
Iterate the supported services in ascending bit order.
Trait Implementations§
Source§impl Clone for ServicesSupported
impl Clone for ServicesSupported
impl Copy for ServicesSupported
Source§impl Debug for ServicesSupported
impl Debug for ServicesSupported
Source§impl Default for ServicesSupported
impl Default for ServicesSupported
Source§impl Display for ServicesSupported
impl Display for ServicesSupported
impl Eq for ServicesSupported
Source§impl Hash for ServicesSupported
impl Hash for ServicesSupported
Source§impl PartialEq for ServicesSupported
impl PartialEq for ServicesSupported
impl StructuralPartialEq for ServicesSupported
Auto Trait Implementations§
impl Freeze for ServicesSupported
impl RefUnwindSafe for ServicesSupported
impl Send for ServicesSupported
impl Sync for ServicesSupported
impl Unpin for ServicesSupported
impl UnsafeUnpin for ServicesSupported
impl UnwindSafe for ServicesSupported
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