pub struct ReportPayloadDescriptor {
pub payload_type: ReportType,
pub reading_type: ReadingType,
pub units: Option<Unit>,
pub accuracy: Option<f32>,
pub confidence: Option<Confidence>,
}Expand description
Contextual information used to interpret report payload values. E.g. a USAGE payload simply contains a usage value, an associated descriptor provides necessary context such as units and data quality.
Fields§
§payload_type: ReportTypeRepresents the nature of values.
See enumerations in Definitions for defined string values, or use privately defined strings
reading_type: ReadingTypeEnumerated or private string signifying the type of reading.
units: Option<Unit>Units of measure.
accuracy: Option<f32>A quantification of the accuracy of a set of payload values.
confidence: Option<Confidence>A quantification of the confidence in a set of payload values.
Implementations§
Source§impl ReportPayloadDescriptor
impl ReportPayloadDescriptor
pub fn new(payload_type: ReportType) -> Self
Trait Implementations§
Source§impl Clone for ReportPayloadDescriptor
impl Clone for ReportPayloadDescriptor
Source§fn clone(&self) -> ReportPayloadDescriptor
fn clone(&self) -> ReportPayloadDescriptor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ReportPayloadDescriptor
impl Debug for ReportPayloadDescriptor
Source§impl<'de> Deserialize<'de> for ReportPayloadDescriptor
impl<'de> Deserialize<'de> for ReportPayloadDescriptor
Source§fn 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
Source§impl PartialEq for ReportPayloadDescriptor
impl PartialEq for ReportPayloadDescriptor
Source§impl Serialize for ReportPayloadDescriptor
impl Serialize for ReportPayloadDescriptor
impl StructuralPartialEq for ReportPayloadDescriptor
Source§impl Validate for ReportPayloadDescriptor
impl Validate for ReportPayloadDescriptor
Source§impl<'v_a> ValidateArgs<'v_a> for ReportPayloadDescriptor
impl<'v_a> ValidateArgs<'v_a> for ReportPayloadDescriptor
Auto Trait Implementations§
impl Freeze for ReportPayloadDescriptor
impl RefUnwindSafe for ReportPayloadDescriptor
impl Send for ReportPayloadDescriptor
impl Sync for ReportPayloadDescriptor
impl Unpin for ReportPayloadDescriptor
impl UnsafeUnpin for ReportPayloadDescriptor
impl UnwindSafe for ReportPayloadDescriptor
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more