Skip to main content

Body

Struct Body 

Source
pub struct Body<'a> {
    pub name: String,
    pub free: bool,
    pub carrier: Option<usize>,
    pub world: Pose,
    pub part: Reader<'a>,
    pub file: String,
}
Expand description

A rigid body of the mechanism: a part placed in the assembly, however deep.

Fields§

§name: String

Its name in the assembly: hinge/pin.

§free: bool

Whether the mates may move it: it has a pose of its own to solve for, and no fixed mate holds it.

§carrier: Option<usize>

The body it is carried by, by index: for a copy of a pattern, the part it copies — it goes where the pattern puts it after that part, and moves with it as one.

§world: Pose

Where it is in the assembly.

§part: Reader<'a>

Its part, as placed.

§file: String

The file its part is placed from.

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for Body<'a>

§

impl<'a> !Send for Body<'a>

§

impl<'a> !Sync for Body<'a>

§

impl<'a> !UnwindSafe for Body<'a>

§

impl<'a> Freeze for Body<'a>

§

impl<'a> Unpin for Body<'a>

§

impl<'a> UnsafeUnpin for Body<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.