Struct DataSetPacketField

Source
pub struct DataSetPacketField<'a, T>
where T: AsRef<[Data]> + 'a,
{ /* private fields */ }
Expand description

An item returned from the DataSetPacketFieldIterator for each field.

Implementations§

Source§

impl<'a, T> DataSetPacketField<'a, T>
where T: AsRef<[Data]>,

Source

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.

Source

pub fn data_set(&self) -> &[Data]

Return the DataSet associated with this field.

Source

pub fn data_index(&self) -> usize

Return the index of the Data associated with this field.

Source

pub fn data(&self) -> &Data

Return the Data associated with this field.

Source

pub fn packet_spec(&self) -> &PacketSpec

Return the PacketSpec associated with this field.

Source

pub fn field_index(&self) -> usize

Return the index of the PacketFieldSpec associated with this field.

Source

pub fn field_spec(&self) -> &PacketFieldSpec

Return the PacketFieldSpec associated with this field.

Source

pub fn packet_id(&self) -> PacketId

Return the PacketId associated with this field.

Source

pub fn field_id(&self) -> &str

Return the field ID associated with this field.

Source

pub fn packet_field_id(&self) -> PacketFieldId<'_>

Return the PacketFieldId associated with this field.

Source

pub fn raw_value_i64(&self) -> &Option<i64>

Return the raw value associated with this field.

Source

pub fn raw_value_f64(&self) -> Option<f64>

Return the raw value associated with this field.

Source

pub fn fmt_raw_value(&self, append_unit: bool) -> PacketFieldFormatter<'_>

Format the raw value associated with this field.

Trait Implementations§

Source§

impl<'a, T> Debug for DataSetPacketField<'a, T>
where T: Debug + AsRef<[Data]> + 'a,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.