pub struct DataSetPacketField<'a, T>{ /* private fields */ }
Expand description
An item returned from the DataSetPacketFieldIterator
for each field.
Implementations§
Source§impl<'a, T> DataSetPacketField<'a, T>
impl<'a, T> DataSetPacketField<'a, T>
Sourcepub fn new(
data_set: &'a T,
data_index: usize,
packet_spec: Rc<PacketSpec>,
field_index: usize,
raw_value: Option<i64>,
) -> DataSetPacketField<'a, T>
pub fn new( data_set: &'a T, data_index: usize, packet_spec: Rc<PacketSpec>, field_index: usize, raw_value: Option<i64>, ) -> DataSetPacketField<'a, T>
Construct new DataSetPacketField
value.
Sourcepub fn data_index(&self) -> usize
pub fn data_index(&self) -> usize
Return the index of the Data
associated with this field.
Sourcepub fn packet_spec(&self) -> &PacketSpec
pub fn packet_spec(&self) -> &PacketSpec
Return the PacketSpec
associated with this field.
Sourcepub fn field_index(&self) -> usize
pub fn field_index(&self) -> usize
Return the index of the PacketFieldSpec
associated with this field.
Sourcepub fn field_spec(&self) -> &PacketFieldSpec
pub fn field_spec(&self) -> &PacketFieldSpec
Return the PacketFieldSpec
associated with this field.
Sourcepub fn packet_field_id(&self) -> PacketFieldId<'_>
pub fn packet_field_id(&self) -> PacketFieldId<'_>
Return the PacketFieldId
associated with this field.
Sourcepub fn raw_value_i64(&self) -> &Option<i64>
pub fn raw_value_i64(&self) -> &Option<i64>
Return the raw value associated with this field.
Sourcepub fn raw_value_f64(&self) -> Option<f64>
pub fn raw_value_f64(&self) -> Option<f64>
Return the raw value associated with this field.
Sourcepub fn fmt_raw_value(&self, append_unit: bool) -> PacketFieldFormatter<'_>
pub fn fmt_raw_value(&self, append_unit: bool) -> PacketFieldFormatter<'_>
Format the raw value associated with this field.
Trait Implementations§
Auto Trait Implementations§
impl<'a, T> Freeze for DataSetPacketField<'a, T>
impl<'a, T> RefUnwindSafe for DataSetPacketField<'a, T>where
T: RefUnwindSafe,
impl<'a, T> !Send for DataSetPacketField<'a, T>
impl<'a, T> !Sync for DataSetPacketField<'a, T>
impl<'a, T> Unpin for DataSetPacketField<'a, T>
impl<'a, T> UnwindSafe for DataSetPacketField<'a, T>where
T: RefUnwindSafe,
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