[−][src]Struct async_resol_vbus::SpecificationFile
Contains the information from a VSF1 file.
Fields
datecode: i32
Date of VSF creation in format 'YYYMMDD'
texts: Vec<String>
List of texts.
localized_texts: Vec<LocalizedText>
List of localized texts.
units: Vec<Unit>
List of units.
device_templates: Vec<DeviceTemplate>
List of device templates.
packet_templates: Vec<PacketTemplate>
List of packet templates.
Methods
impl SpecificationFile
[src]
pub fn from_bytes(bytes: &[u8]) -> Result<SpecificationFile, Error>
[src]
Construct a new SpecificationFile
from a byte slice of VSF1 data.
pub fn new_default() -> SpecificationFile
[src]
Construct a new SpecificationFile
from the embedded default VSF data.
pub fn text_by_index(&self, idx: &TextIndex) -> &str
[src]
Get text by its index.
pub fn localized_text_by_index(
&self,
idx: &LocalizedTextIndex,
language: Language
) -> &str
[src]
&self,
idx: &LocalizedTextIndex,
language: Language
) -> &str
Get localized text by its index and language.
pub fn unit_family_by_id(&self, id: &UnitFamilyId) -> UnitFamily
[src]
Get UnitFamily
by its ID.
pub fn unit_by_id(&self, id: &UnitId) -> &Unit
[src]
Get Unit
by its index.
pub fn type_by_id(&self, id: &TypeId) -> Type
[src]
Get Type
by its ID.
pub fn find_device_template(
&self,
self_address: u16,
peer_address: u16
) -> Option<&DeviceTemplate>
[src]
&self,
self_address: u16,
peer_address: u16
) -> Option<&DeviceTemplate>
Find a DeviceTemplate
matching the self and peer addresses.
pub fn find_packet_template(
&self,
destination_address: u16,
source_address: u16,
command: u16
) -> Option<&PacketTemplate>
[src]
&self,
destination_address: u16,
source_address: u16,
command: u16
) -> Option<&PacketTemplate>
Find a PacketTemplate
matching the destination and source addresses as well as the command.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for SpecificationFile
impl Send for SpecificationFile
impl Sync for SpecificationFile
impl Unpin for SpecificationFile
impl UnwindSafe for SpecificationFile
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,