pub struct Uncertainty {
pub absolute: Option<f64>,
pub relative: Option<f64>,
pub basis: &'static str,
}Expand description
How wrong a reading may be when nothing has gone wrong.
Fields§
§absolute: Option<f64>Absolute error in the channel’s own unit, where it is known.
relative: Option<f64>Fractional error, where that is the better description.
basis: &'static strWhere the uncertainty comes from, in one line.
Implementations§
Source§impl Uncertainty
impl Uncertainty
pub const fn absolute(value: f64, basis: &'static str) -> Uncertainty
pub const fn relative(value: f64, basis: &'static str) -> Uncertainty
pub const fn unknown(basis: &'static str) -> Uncertainty
Trait Implementations§
Source§impl Clone for Uncertainty
impl Clone for Uncertainty
Source§fn clone(&self) -> Uncertainty
fn clone(&self) -> Uncertainty
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 moreimpl Copy for Uncertainty
Source§impl Debug for Uncertainty
impl Debug for Uncertainty
Source§impl Deserialize<'static> for Uncertainty
impl Deserialize<'static> for Uncertainty
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Uncertainty, <__D as Deserializer<'static>>::Error>where
__D: Deserializer<'static>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Uncertainty, <__D as Deserializer<'static>>::Error>where
__D: Deserializer<'static>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for Uncertainty
impl PartialEq for Uncertainty
Source§impl Serialize for Uncertainty
impl Serialize for Uncertainty
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for Uncertainty
Auto Trait Implementations§
impl Freeze for Uncertainty
impl RefUnwindSafe for Uncertainty
impl Send for Uncertainty
impl Sync for Uncertainty
impl Unpin for Uncertainty
impl UnsafeUnpin for Uncertainty
impl UnwindSafe for Uncertainty
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