pub struct Role(pub u32);Expand description
What an entity is, relative to the operation that made it.
The low values are shared vocabulary. Everything from Role::OP_DEFINED
up is interpreted by the producing operation alone. Keeping it a newtype
rather than an enum avoids fixing a taxonomy of every role in a CAD
kernel before the operations that need one exist.
Tuple Fields§
§0: u32Implementations§
Source§impl Role
impl Role
Sourcepub const SOLE: Self
pub const SOLE: Self
No distinguishing role: the operation produced exactly one entity of this kind, so it needs no further discriminator.
Sourcepub const OUTER: Self
pub const OUTER: Self
The result’s outer boundary: the outer wire of a face, the outer shell of a solid.
Sourcepub const OP_DEFINED: u32 = 1024
pub const OP_DEFINED: u32 = 1024
The first value an operation may assign meaning to itself.
Sourcepub const fn op_defined(index: u32) -> Self
pub const fn op_defined(index: u32) -> Self
An operation-defined role. index is offset above Role::OP_DEFINED.
Trait Implementations§
impl Copy for Role
impl Eq for Role
Source§impl Ord for Role
impl Ord for Role
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Role
impl PartialOrd for Role
impl StructuralPartialEq for Role
Auto Trait Implementations§
impl Freeze for Role
impl RefUnwindSafe for Role
impl Send for Role
impl Sync for Role
impl Unpin for Role
impl UnsafeUnpin for Role
impl UnwindSafe for Role
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,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.