pub struct ViewInstance {
pub name: String,
pub component: String,
pub frame: CoordinateSystem,
pub pose: Pose,
pub view: Rc<PartView>,
pub state: Option<String>,
pub fixed: bool,
pub color: Option<String>,
}Expand description
A part placed in the part drawn — directly or in a part placed in it — drawn as its part’s own view moved to where it is. Serialized, a viewer gets the part by its key and where to draw it.
Fields§
§name: StringIts name in the part drawn: bolt, or asm/bolt for one placed in
a placed part.
component: StringThe key of its part.
frame: CoordinateSystemWhere it is: its own frame in the part drawn.
pose: Pose§view: Rc<PartView>Its part as drawn.
state: Option<String>The state of the part drawn its pose is — None for a copy of a
pattern, which goes where the pattern puts it.
fixed: boolWhether no mate moves it.
color: Option<String>The colour it is drawn in over its own, #rrggbb, if the user chose
one for it (see crate::editor::Command::Appearance).
Trait Implementations§
Source§impl Clone for ViewInstance
impl Clone for ViewInstance
Source§fn clone(&self) -> ViewInstance
fn clone(&self) -> ViewInstance
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 moreSource§impl Debug for ViewInstance
impl Debug for ViewInstance
Auto Trait Implementations§
impl !RefUnwindSafe for ViewInstance
impl !Send for ViewInstance
impl !Sync for ViewInstance
impl !UnwindSafe for ViewInstance
impl Freeze for ViewInstance
impl Unpin for ViewInstance
impl UnsafeUnpin for ViewInstance
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