pub struct Point {Show 20 fields
pub point_id: String,
pub name: String,
pub description: String,
pub access: i32,
pub storage_type: i32,
pub value_type: Option<ValueType>,
pub mapping: Option<Mapping>,
pub transform: Option<Transform>,
pub unit: String,
pub display_precision: u32,
pub measurand: Option<MeasurandRef>,
pub bit_fields: Vec<BitField>,
pub fields: Vec<RegisterField>,
pub na_values: Vec<NaValue>,
pub datetime: Option<DateTimeSpec>,
pub write_encoding: Option<WriteEncoding>,
pub available_if: Option<Availability>,
pub selector_ref: Option<SelectorRef>,
pub recommended_poll_period_ms: u32,
pub write: Option<WriteSemantics>,
}Expand description
§5.3 A user-visible data point exposed by a device.
Fields§
§point_id: String§name: String§description: String§access: i32§storage_type: i32§value_type: Option<ValueType>§mapping: Option<Mapping>§transform: Option<Transform>§unit: String§display_precision: u32§measurand: Option<MeasurandRef>§bit_fields: Vec<BitField>boolean/enum bit ranges (legacy form)
fields: Vec<RegisterField>v0.4 — typed sub-fields (§13.1)
na_values: Vec<NaValue>v0.4 — unavailable/sentinel (§8.4)
datetime: Option<DateTimeSpec>v0.4 — when primitive=DATETIME (§8.5)
write_encoding: Option<WriteEncoding>v0.4 — distinct write path (§11.5)
available_if: Option<Availability>v0.4 — conditional presence (§17.1)
selector_ref: Option<SelectorRef>v0.4 — meaning/scale by register (§10.5)
recommended_poll_period_ms: u32§write: Option<WriteSemantics>§11 write behaviors + constraints
Implementations§
Source§impl Point
impl Point
Sourcepub fn access(&self) -> AccessMode
pub fn access(&self) -> AccessMode
Returns the enum value of access, or the default if the field is set to an invalid enum value.
Sourcepub fn set_access(&mut self, value: AccessMode)
pub fn set_access(&mut self, value: AccessMode)
Sets access to the provided enum value.
Sourcepub fn storage_type(&self) -> StorageType
pub fn storage_type(&self) -> StorageType
Returns the enum value of storage_type, or the default if the field is set to an invalid enum value.
Sourcepub fn set_storage_type(&mut self, value: StorageType)
pub fn set_storage_type(&mut self, value: StorageType)
Sets storage_type to the provided enum value.
Trait Implementations§
§impl<'de> Deserialize<'de> for Point
impl<'de> Deserialize<'de> for Point
§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Message for Point
impl Message for Point
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message to a buffer. Read more
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message to a newly allocated buffer.
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message with a length-delimiter to a buffer. Read more
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message with a length-delimiter to a newly allocated buffer.
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes an instance of the message from a buffer. Read more
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes a length-delimited instance of the message from the buffer.
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes an instance of the message from a buffer, and merges it into
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self.impl StructuralPartialEq for Point
Auto Trait Implementations§
impl Freeze for Point
impl RefUnwindSafe for Point
impl Send for Point
impl Sync for Point
impl Unpin for Point
impl UnsafeUnpin for Point
impl UnwindSafe for Point
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