Skip to main content

DataEntry

Struct DataEntry 

Source
pub struct DataEntry<'pdg> {
Show 17 fields pub pdgid: PdgId, pub edition: String, pub value_type: ValueType, pub in_summary_table: bool, pub confidence_level: Option<f64>, pub limit_type: Option<LimitType>, pub comment: Option<String>, pub value: Option<f64>, pub value_text: Option<String>, pub error_positive: Option<f64>, pub error_negative: Option<f64>, pub scale_factor: Option<f64>, pub unit_text: String, pub display_value_text: String, pub display_power_of_ten: isize, pub display_in_percent: bool, pub sort: Option<isize>, /* private fields */
}
Expand description

Numeric data row for a PDG identifier.

Data entries retain a link to the originating Pdg handle so related measurements, footnotes, and text blocks can be loaded on demand.

Fields§

§pdgid: PdgId

PDG identifier for this data row.

§edition: String

PDG edition for this value.

§value_type: ValueType

Classification of the value row.

§in_summary_table: bool

Whether the row appears in the PDG summary table.

§confidence_level: Option<f64>

Confidence level associated with the row.

§limit_type: Option<LimitType>

Limit or range type, when this row is not a simple central value.

§comment: Option<String>

PDG comment attached to the data row.

§value: Option<f64>

Parsed numeric central value.

§value_text: Option<String>

Raw value text when the value is not represented solely by DataEntry::value.

§error_positive: Option<f64>

Positive uncertainty on DataEntry::value.

§error_negative: Option<f64>

Negative uncertainty on DataEntry::value.

§scale_factor: Option<f64>

PDG scale factor applied to this value.

§unit_text: String

Unit text from the PDG table.

§display_value_text: String

Display-ready value text from the PDG table.

§display_power_of_ten: isize

Power-of-ten exponent used when displaying the value.

§display_in_percent: bool

Whether the display value should be interpreted as a percentage.

§sort: Option<isize>

Sort key used by the PDG tables.

Implementations§

Source§

impl<'pdg> DataEntry<'pdg>

Source

pub fn measurements(&self) -> PdgResult<Vec<PdgMeasurement>>

Loads measurements supporting this data entry.

§Errors

Returns a database error if the measurement query cannot be executed.

Source

pub fn footnotes(&self) -> PdgResult<Vec<PdgFootnote>>

Loads footnotes attached to this data entry.

§Errors

Returns a database error if the footnote query cannot be executed.

Source

pub fn texts(&self) -> PdgResult<Vec<PdgText>>

Loads text blocks attached to this data entry.

§Errors

Returns a database error if the text query cannot be executed.

Trait Implementations§

Source§

impl<'pdg> Clone for DataEntry<'pdg>

Source§

fn clone(&self) -> DataEntry<'pdg>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'pdg> Debug for DataEntry<'pdg>

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Display for DataEntry<'_>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'pdg> !RefUnwindSafe for DataEntry<'pdg>

§

impl<'pdg> !Send for DataEntry<'pdg>

§

impl<'pdg> !Sync for DataEntry<'pdg>

§

impl<'pdg> !UnwindSafe for DataEntry<'pdg>

§

impl<'pdg> Freeze for DataEntry<'pdg>

§

impl<'pdg> Unpin for DataEntry<'pdg>

§

impl<'pdg> UnsafeUnpin for DataEntry<'pdg>

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
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.