pub struct ReportPayloadDescriptor {
pub object_type: String,
pub payload_type: PayloadType,
pub reading_type: Option<ReadingType>,
pub units: Option<Unit>,
pub accuracy: Option<f32>,
pub confidence: Option<u8>,
}Expand description
Context needed to interpret report payload values.
Fields§
§object_type: StringDiscriminator; always REPORT_PAYLOAD_DESCRIPTOR.
payload_type: PayloadTypeThe payload type this descriptor describes.
reading_type: Option<ReadingType>How the value was obtained, e.g. ReadingType::DirectRead.
units: Option<Unit>Unit of measure.
accuracy: Option<f32>Quantified accuracy of the values.
confidence: Option<u8>Confidence in the values, 0..=100.
Implementations§
Source§impl ReportPayloadDescriptor
impl ReportPayloadDescriptor
Sourcepub fn new(payload_type: PayloadType) -> Self
pub fn new(payload_type: PayloadType) -> Self
A descriptor for a payload type.
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
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