pub enum Provenance {
Primitive {
op: OpId,
role: Role,
},
Derived {
op: OpId,
from: SmallVec<[EntityId; 2]>,
role: Role,
},
Imported {
source: SourceId,
external: u64,
},
}Expand description
Where an entity came from.
Variants§
Primitive
Created outright by an operation, from no prior entity: the +Z face of
a box, the lateral surface of a cylinder.
Fields
Derived
Derived from one or more existing entities. A face split by a boolean names the face it came from; an intersection edge names both faces.
Fields
Imported
Read from a file. external is the source’s own identifier (a STEP
entity number, say) so that a re-import matches entities up.
Implementations§
Source§impl Provenance
impl Provenance
Sourcepub const fn role(&self) -> Option<Role>
pub const fn role(&self) -> Option<Role>
Which part of its operation’s result this entity is, if the operation named one.
The question provenance exists to answer: “the top face of that box”, asked of a model that has been rebuilt since. An imported entity has no role, because the file said where it came from and not what it is for.
Trait Implementations§
Source§impl Clone for Provenance
impl Clone for Provenance
Source§fn clone(&self) -> Provenance
fn clone(&self) -> Provenance
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 Provenance
impl Debug for Provenance
impl Eq for Provenance
Source§impl PartialEq for Provenance
impl PartialEq for Provenance
Source§fn eq(&self, other: &Provenance) -> bool
fn eq(&self, other: &Provenance) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for Provenance
Auto Trait Implementations§
impl Freeze for Provenance
impl RefUnwindSafe for Provenance
impl Send for Provenance
impl Sync for Provenance
impl Unpin for Provenance
impl UnsafeUnpin for Provenance
impl UnwindSafe for Provenance
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