pub struct SampledValue {
pub value: String,
pub context: Option<ReadingContext>,
pub format: Option<ValueFormat>,
pub measurand: Option<Measurand>,
pub phase: Option<Phase>,
pub location: Option<Location>,
pub unit: Option<UnitOfMeasure>,
}
Expand description
Single sampled value in MeterValues. Each value can be accompanied by optional fields.
Fields
value: String
Required. Value as a “Raw” (decimal) number or “SignedData”. Field Type is “string” to allow for digitally signed data readings. Decimal numeric values are also acceptable to allow fractional values for measurands such as Temperature and Current.
context: Option<ReadingContext>
Optional. Type of detail value: start, end or sample. Default = “Sample.Periodic”
format: Option<ValueFormat>
Optional. Raw or signed data. Default = “Raw”
measurand: Option<Measurand>
Optional. Type of measurement. Default = “Energy.Active.Import.Register”
phase: Option<Phase>
Optional. indicates how the measured value is to be interpreted. For instance between L1 and neutral (L1-N) Please note that not all values of phase are applicable to all Measurands. When phase is absent, the measured value is interpreted as an overall value.
location: Option<Location>
Optional. Location of measurement. Default=”Outlet”
unit: Option<UnitOfMeasure>
Optional. Unit of the value. Default = “Wh” if the (default) measurand is an “Energy” type.
Trait Implementations
sourceimpl Clone for SampledValue
impl Clone for SampledValue
sourcefn clone(&self) -> SampledValue
fn clone(&self) -> SampledValue
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for SampledValue
impl Debug for SampledValue
sourceimpl<'de> Deserialize<'de> for SampledValue
impl<'de> Deserialize<'de> for SampledValue
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl PartialEq<SampledValue> for SampledValue
impl PartialEq<SampledValue> for SampledValue
sourcefn eq(&self, other: &SampledValue) -> bool
fn eq(&self, other: &SampledValue) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &SampledValue) -> bool
fn ne(&self, other: &SampledValue) -> bool
This method tests for !=
.
sourceimpl Serialize for SampledValue
impl Serialize for SampledValue
impl StructuralPartialEq for SampledValue
Auto Trait Implementations
impl RefUnwindSafe for SampledValue
impl Send for SampledValue
impl Sync for SampledValue
impl Unpin for SampledValue
impl UnwindSafe for SampledValue
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more