Skip to main content

Namer

Struct Namer 

Source
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

Source

pub fn new(kind: &str, operation: &str) -> GeopResult<Self>

Names for operation kind run as the program step operation.

Source

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,...).

Source

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.

Source

pub fn name(&self, args: &[&str]) -> String

kind(operation,arg,...), an argument longer than LONGEST_ARGUMENT given by its digest instead (see digest).

Source

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.

Source

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.

Source

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§

Source§

impl Clone for Namer

Source§

fn clone(&self) -> Namer

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Namer

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for Namer

Source§

impl PartialEq for Namer

Source§

fn eq(&self, other: &Namer) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.