pub struct BACnetNameValue {
pub name: String,
pub value: Option<PropertyValue>,
}Expand description
BACnetNameValue (Clause 21): a tag’s name and, for a value tag, its
value. A semantic tag has a name alone (Annex Y.1.4).
On the wire it is a SEQUENCE with no frame of its own: the name as a
CharacterString under primitive context tag [0], then the value, when
there is one, application-tagged as its own datatype. The bacnet-encoding
crate owns the codec. The 2024-04-29 errata, item 37, restricts the
optional value to one primitive; Date and Time are allowed separately.
use bacnet_types::constructed::BACnetNameValue;
use bacnet_types::primitives::PropertyValue;
let semantic = BACnetNameValue::semantic("exhaust");
let valued = BACnetNameValue::valued("floor", PropertyValue::Unsigned(3));
assert!(semantic.value.is_none() && valued.value.is_some());Fields§
§name: StringContext tag 0: the tag’s name.
value: Option<PropertyValue>One primitive value; None for a semantic tag. The codec and object
profile validator reject List and ApplicationData values.
Implementations§
Trait Implementations§
Source§impl Clone for BACnetNameValue
impl Clone for BACnetNameValue
Source§impl Debug for BACnetNameValue
impl Debug for BACnetNameValue
Source§impl PartialEq for BACnetNameValue
impl PartialEq for BACnetNameValue
impl StructuralPartialEq for BACnetNameValue
Auto Trait Implementations§
impl Freeze for BACnetNameValue
impl RefUnwindSafe for BACnetNameValue
impl Send for BACnetNameValue
impl Sync for BACnetNameValue
impl Unpin for BACnetNameValue
impl UnsafeUnpin for BACnetNameValue
impl UnwindSafe for BACnetNameValue
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