pub enum MateKind {
Constraint(Kind),
Joint(JointKind),
Coupling(CouplingKind),
Anchor(Anchor),
}Expand description
What a mate asks: that two entities touch, line up or keep a distance
(a constraint); that one part may only turn or slide against another
about an axis (a joint); or that two joints move together (a coupling).
Serializes flat, by the kind’s own type: {"type": "revolute", "max": 90.0}.
Variants§
Implementations§
Source§impl MateKind
impl MateKind
pub fn label(&self) -> &'static str
Sourcepub fn roles(&self) -> &'static [Role]
pub fn roles(&self) -> &'static [Role]
What an element of a mate of this kind can be, for a constraint:
what its geometry is taken from (see Kind::roles). A joint puts
a frame on any element; a coupling ties joints, and a fixed mate is
given its element by the step: neither is picked by role.
Trait Implementations§
impl Copy for MateKind
Source§impl<'de> Deserialize<'de> for MateKind
impl<'de> Deserialize<'de> for MateKind
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
impl StructuralPartialEq for MateKind
Auto Trait Implementations§
impl Freeze for MateKind
impl RefUnwindSafe for MateKind
impl Send for MateKind
impl Sync for MateKind
impl Unpin for MateKind
impl UnsafeUnpin for MateKind
impl UnwindSafe for MateKind
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