pub struct Namer { /* private fields */ }Expand description
Builds the names one run of one operation gives to what it creates:
kind(operation,arg,...), see the crate docs.
Implementations§
Source§impl Namer
impl Namer
Sourcepub fn new(kind: &str, operation: &str) -> GeopResult<Self>
pub fn new(kind: &str, operation: &str) -> GeopResult<Self>
Names for operation kind run as the program step operation.
Sourcepub fn scoped(&self, scope: &str) -> Self
pub fn scoped(&self, scope: &str) -> Self
The names for one of several parts of the operation’s work that
would otherwise name things alike — the second side of an extrude
built on its own, say: kind(operation,scope,arg,...).
Sourcepub fn root(&self) -> String
pub fn root(&self) -> String
kind(operation): the operation’s own name, which is what the solid
it builds is called — kind(operation,scope) for a scoped one.
Sourcepub fn name(&self, args: &[&str]) -> String
pub fn name(&self, args: &[&str]) -> String
kind(operation,arg,...), an argument longer than
LONGEST_ARGUMENT given by its digest instead (see digest).
Sourcepub fn arguments_of<'a>(&self, name: &'a str) -> Option<&'a str>
pub fn arguments_of<'a>(&self, name: &'a str) -> Option<&'a str>
What follows the operation in name, one of this namer’s: X for
kind(operation,X). None, for a name of another.
Sourcepub fn piece(&self, origin: &str, at: &str) -> String
pub fn piece(&self, origin: &str, at: &str) -> String
kind(operation,origin,at): a piece split off the entity named
origin at — or along — the entity named at. A piece is named
after what it was split off first of all, so that origin_of
traces it back however often it was split since.
Sourcepub fn is_piece_of(&self, name: &str, origin: &str) -> bool
pub fn is_piece_of(&self, name: &str, origin: &str) -> bool
Whether name is one of the Namer::pieces this namer named of
origin.
Trait Implementations§
impl Eq for Namer
impl StructuralPartialEq for Namer
Auto Trait Implementations§
impl Freeze for Namer
impl RefUnwindSafe for Namer
impl Send for Namer
impl Sync for Namer
impl Unpin for Namer
impl UnsafeUnpin for Namer
impl UnwindSafe for Namer
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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
key and return true if they are equal.