pub enum Element {
Group,
Workpiece(Workpiece),
BuiltinWorkpiece(BuiltinWorkpiece),
Multiplicity,
InputPlaceholder,
}
Expand description
An element defines the entity of a Model
.
Variants§
Group
A group element is created by a body {}
.
Workpiece(Workpiece)
A workpiece that holds properties.
A workpiece is created by workbenches.
BuiltinWorkpiece(BuiltinWorkpiece)
A built-in workpiece.
A workpiece is created by workbenches.
Multiplicity
Multiplicity.
InputPlaceholder
Children marker.
Implementations§
Source§impl Element
impl Element
Sourcepub fn output_type(&self) -> OutputType
pub fn output_type(&self) -> OutputType
Get output type of element.
Sourcepub fn is_operation(&self) -> bool
pub fn is_operation(&self) -> bool
Check if an element is an operation.
Source§impl Element
impl Element
Sourcepub fn get_affine_transform(&self) -> RenderResult<Option<AffineTransform>>
pub fn get_affine_transform(&self) -> RenderResult<Option<AffineTransform>>
Fetch the local matrix
Trait Implementations§
Source§impl PropertiesAccess for Element
impl PropertiesAccess for Element
Source§fn get_property(&self, id: &Identifier) -> Option<&Value>
fn get_property(&self, id: &Identifier) -> Option<&Value>
Get a value of property, or
Value::None
if the property does not exist.Source§fn set_property(&mut self, id: Identifier, value: Value) -> Option<Value>
fn set_property(&mut self, id: Identifier, value: Value) -> Option<Value>
Set value of an existing property or add a new property
Source§fn get_properties(&self) -> Option<&Properties>
fn get_properties(&self) -> Option<&Properties>
Get all properties
Source§fn add_properties(&mut self, props: Properties)
fn add_properties(&mut self, props: Properties)
Set or create properties with the given ids and values.
Auto Trait Implementations§
impl Freeze for Element
impl !RefUnwindSafe for Element
impl !Send for Element
impl !Sync for Element
impl Unpin for Element
impl !UnwindSafe for Element
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string()
Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString
. Read more