pub struct DataRecord {
pub template_id: u16,
pub scope_field_count: u16,
pub fields: Vec<Field>,
}Expand description
Data Record - RFC 7011 Section 3.4.3
The Field Values of a Data Record are in the same order as the Field Specifiers of the Template (or Options Template) it was decoded with.
Fields§
§template_id: u16Template ID used to decode this record
scope_field_count: u16Number of leading Scope Fields (0 unless decoded with an Options Template)
fields: Vec<Field>Decoded fields
Implementations§
Source§impl DataRecord
impl DataRecord
Sourcepub fn get(&self, name: &str) -> Option<&FieldValue>
pub fn get(&self, name: &str) -> Option<&FieldValue>
Find the first IANA (non-reverse) field by Information Element name
Sourcepub fn get_by_id(
&self,
id: u16,
enterprise_number: Option<u32>,
) -> Option<&FieldValue>
pub fn get_by_id( &self, id: u16, enterprise_number: Option<u32>, ) -> Option<&FieldValue>
Find the first field by Information Element identifier and Private
Enterprise Number (None for IANA elements)
Sourcepub fn scope_fields(&self) -> &[Field]
pub fn scope_fields(&self) -> &[Field]
The Scope Fields of a record decoded with an Options Template
Sourcepub fn non_scope_fields(&self) -> &[Field]
pub fn non_scope_fields(&self) -> &[Field]
The non-scope fields
Trait Implementations§
Source§impl Clone for DataRecord
impl Clone for DataRecord
Source§impl Debug for DataRecord
impl Debug for DataRecord
Source§impl PartialEq for DataRecord
impl PartialEq for DataRecord
impl StructuralPartialEq for DataRecord
Auto Trait Implementations§
impl Freeze for DataRecord
impl RefUnwindSafe for DataRecord
impl Send for DataRecord
impl Sync for DataRecord
impl Unpin for DataRecord
impl UnsafeUnpin for DataRecord
impl UnwindSafe for DataRecord
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