pub struct DynamicsData {
pub damping: Option<f32>,
pub friction: Option<f32>,
}
Fields§
§damping: Option<f32>
§friction: Option<f32>
Implementations§
source§impl DynamicsData
impl DynamicsData
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!(DynamicsData {
damping: Some(1.),
friction: Some(2.)
}
.contains_some());
assert!(DynamicsData {
damping: Some(1.),
..Default::default()
}
.contains_some());
assert!(DynamicsData {
friction: Some(2.),
..Default::default()
}
.contains_some());
assert!(!DynamicsData::default().contains_some())
Trait Implementations§
source§impl Clone for DynamicsData
impl Clone for DynamicsData
source§fn clone(&self) -> DynamicsData
fn clone(&self) -> DynamicsData
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 DynamicsData
impl Debug for DynamicsData
source§impl Default for DynamicsData
impl Default for DynamicsData
source§fn default() -> DynamicsData
fn default() -> DynamicsData
Returns the “default value” for a type. Read more
source§impl PartialEq<DynamicsData> for DynamicsData
impl PartialEq<DynamicsData> for DynamicsData
source§fn eq(&self, other: &DynamicsData) -> bool
fn eq(&self, other: &DynamicsData) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl ToURDF for DynamicsData
impl ToURDF for DynamicsData
impl Copy for DynamicsData
impl StructuralPartialEq for DynamicsData
Auto Trait Implementations§
impl RefUnwindSafe for DynamicsData
impl Send for DynamicsData
impl Sync for DynamicsData
impl Unpin for DynamicsData
impl UnwindSafe for DynamicsData
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.