pub struct CalibrationData {
pub rising: Option<f32>,
pub falling: Option<f32>,
}
Expand description
TODO: DOC
Fields§
§rising: Option<f32>
§falling: Option<f32>
Implementations§
source§impl CalibrationData
impl CalibrationData
sourcepub fn contains_some(&self) -> bool
pub fn contains_some(&self) -> bool
A function to check if any of the fields are set.
It doesn’t check if the some fields have the default value, since it can be format depended.
Example
assert!(CalibrationData {
rising: Some(1.),
falling: Some(2.)
}
.contains_some());
assert!(CalibrationData {
rising: Some(1.),
..Default::default()
}
.contains_some());
assert!(CalibrationData {
falling: Some(2.),
..Default::default()
}
.contains_some());
assert!(!CalibrationData::default().contains_some())
Trait Implementations§
source§impl Clone for CalibrationData
impl Clone for CalibrationData
source§fn clone(&self) -> CalibrationData
fn clone(&self) -> CalibrationData
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 CalibrationData
impl Debug for CalibrationData
source§impl Default for CalibrationData
impl Default for CalibrationData
source§fn default() -> CalibrationData
fn default() -> CalibrationData
Returns the “default value” for a type. Read more
source§impl PartialEq<CalibrationData> for CalibrationData
impl PartialEq<CalibrationData> for CalibrationData
source§fn eq(&self, other: &CalibrationData) -> bool
fn eq(&self, other: &CalibrationData) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl ToURDF for CalibrationData
impl ToURDF for CalibrationData
impl Copy for CalibrationData
impl StructuralPartialEq for CalibrationData
Auto Trait Implementations§
impl RefUnwindSafe for CalibrationData
impl Send for CalibrationData
impl Sync for CalibrationData
impl Unpin for CalibrationData
impl UnwindSafe for CalibrationData
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<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.