pub struct DeviceProfile {
pub device_id: String,
pub vendor: String,
pub model: String,
pub family: String,
pub description: String,
pub supported_transports: Vec<i32>,
pub default_unit_id: u32,
pub firmware_versions: Vec<String>,
pub blocks: Vec<RegisterBlock>,
pub variants: Vec<DeviceVariant>,
}Expand description
§16 A device model, family, or reusable abstract device.
Fields§
§device_id: String§vendor: String§model: String§family: String§description: String§supported_transports: Vec<i32>§default_unit_id: u32§firmware_versions: Vec<String>§16
blocks: Vec<RegisterBlock>§variants: Vec<DeviceVariant>Implementations§
Source§impl DeviceProfile
impl DeviceProfile
Sourcepub fn supported_transports(
&self,
) -> FilterMap<Cloned<Iter<'_, i32>>, fn(i32) -> Option<Transport>>
pub fn supported_transports( &self, ) -> FilterMap<Cloned<Iter<'_, i32>>, fn(i32) -> Option<Transport>>
Returns an iterator which yields the valid enum values contained in supported_transports.
Sourcepub fn push_supported_transports(&mut self, value: Transport)
pub fn push_supported_transports(&mut self, value: Transport)
Appends the provided enum value to supported_transports.
Trait Implementations§
Source§impl Clone for DeviceProfile
impl Clone for DeviceProfile
Source§fn clone(&self) -> DeviceProfile
fn clone(&self) -> DeviceProfile
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DeviceProfile
impl Debug for DeviceProfile
Source§impl Default for DeviceProfile
impl Default for DeviceProfile
§impl<'de> Deserialize<'de> for DeviceProfile
impl<'de> Deserialize<'de> for DeviceProfile
§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 DeviceProfile
impl Message for DeviceProfile
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.Source§impl PartialEq for DeviceProfile
impl PartialEq for DeviceProfile
Source§fn eq(&self, other: &DeviceProfile) -> bool
fn eq(&self, other: &DeviceProfile) -> bool
Tests for
self and other values to be equal, and is used by ==.§impl Serialize for DeviceProfile
impl Serialize for DeviceProfile
impl StructuralPartialEq for DeviceProfile
Auto Trait Implementations§
impl Freeze for DeviceProfile
impl RefUnwindSafe for DeviceProfile
impl Send for DeviceProfile
impl Sync for DeviceProfile
impl Unpin for DeviceProfile
impl UnsafeUnpin for DeviceProfile
impl UnwindSafe for DeviceProfile
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