pub struct Workpiece {
pub kind: WorkbenchKind,
pub properties: Properties,
pub creator: Hashed<Creator>,
}Expand description
A workpiece is an element produced by a workbench.
Fields§
§kind: WorkbenchKindWorkpiece kind: op, sketch, part.
properties: PropertiesWorkpiece properties.
creator: Hashed<Creator>Creator symbol.
Implementations§
Source§impl Workpiece
impl Workpiece
Sourcepub fn check_output_type(&self, output_type: OutputType) -> EvalResult<()>
pub fn check_output_type(&self, output_type: OutputType) -> EvalResult<()>
Check the output type of the workpiece.
Trait Implementations§
Source§impl ComputedHash for Workpiece
impl ComputedHash for Workpiece
Source§fn computed_hash(&self) -> HashId
fn computed_hash(&self) -> HashId
Return computed hash value.
Source§impl PropertiesAccess for Workpiece
impl PropertiesAccess for Workpiece
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 Workpiece
impl !RefUnwindSafe for Workpiece
impl !Send for Workpiece
impl !Sync for Workpiece
impl Unpin for Workpiece
impl !UnwindSafe for Workpiece
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