pub struct Tag {
pub number: u8,
pub class: TagClass,
pub length: u32,
pub is_opening: bool,
pub is_closing: bool,
}Expand description
A decoded BACnet tag header.
Fields§
§number: u8Tag number: datatype for application tags, field index for context tags.
class: TagClassTag class (application or context).
length: u32Content length in bytes. For application booleans, this holds the raw L/V/T value (0 = false, nonzero = true) with no content octets.
is_opening: boolWhether this is a context-specific opening tag (L/V/T = 6).
is_closing: boolWhether this is a context-specific closing tag (L/V/T = 7).
Implementations§
Source§impl Tag
impl Tag
Sourcepub fn is_boolean_true(&self) -> bool
pub fn is_boolean_true(&self) -> bool
Check if this is an application boolean tag with value true.
Application-tagged booleans encode the value in the tag’s L/V/T field with no content octets.
Sourcepub fn is_context(&self, number: u8) -> bool
pub fn is_context(&self, number: u8) -> bool
Check if this is a context tag matching the given number (not opening/closing).
Sourcepub fn is_opening_tag(&self, number: u8) -> bool
pub fn is_opening_tag(&self, number: u8) -> bool
Check if this is an opening tag matching the given number.
Sourcepub fn is_closing_tag(&self, number: u8) -> bool
pub fn is_closing_tag(&self, number: u8) -> bool
Check if this is a closing tag matching the given number.
Trait Implementations§
impl Copy for Tag
impl Eq for Tag
impl StructuralPartialEq for Tag
Auto Trait Implementations§
impl Freeze for Tag
impl RefUnwindSafe for Tag
impl Send for Tag
impl Sync for Tag
impl Unpin for Tag
impl UnsafeUnpin for Tag
impl UnwindSafe for Tag
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