Skip to main content

PropertyValue

Enum PropertyValue 

Source
pub enum PropertyValue {
Show 14 variants Null, Boolean(bool), Unsigned(u64), Signed(i32), Real(f32), Double(f64), OctetString(Vec<u8>), CharacterString(String), BitString { unused_bits: u8, data: Vec<u8>, }, Enumerated(u32), Date(Date), Time(Time), ObjectIdentifier(ObjectIdentifier), List(Vec<PropertyValue>),
}
Expand description

A BACnet application-layer value.

This enum covers all primitive value types that can appear as property values in BACnet objects. Constructed types (lists, sequences) are represented as nested structures.

Variants§

§

Null

Null value.

§

Boolean(bool)

Boolean value.

§

Unsigned(u64)

Unsigned integer (up to 64-bit for BACnet Unsigned64).

§

Signed(i32)

Signed integer.

§

Real(f32)

IEEE 754 single-precision float.

§

Double(f64)

IEEE 754 double-precision float.

§

OctetString(Vec<u8>)

Octet string (raw bytes).

§

CharacterString(String)

Character string (UTF-8).

§

BitString

Bit string (variable length).

Fields

§unused_bits: u8

Number of unused bits in the last byte.

§data: Vec<u8>

The bit data bytes.

§

Enumerated(u32)

Enumerated value.

§

Date(Date)

Date value.

§

Time(Time)

Time value.

§

ObjectIdentifier(ObjectIdentifier)

Object identifier.

§

List(Vec<PropertyValue>)

A sequence (array) of property values.

Used when reading an entire array property with arrayIndex absent (Clause 15.5.1). Each element is encoded as its own application-tagged value, concatenated in order.

Trait Implementations§

Source§

impl Clone for PropertyValue

Source§

fn clone(&self) -> PropertyValue

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PropertyValue

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for PropertyValue

Source§

fn eq(&self, other: &PropertyValue) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for PropertyValue

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.