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: ReportTypeEnumerated or private string signifying the nature of values.
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 copy of the value. Read more
1.0.0 · 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
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
impl StructuralPartialEq 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 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)