pub struct Name { /* private fields */ }Implementations§
Source§impl Name
impl Name
pub fn base_shape_name(&self) -> &str
Sourcepub fn iter(&self) -> impl Iterator<Item = &Name>
pub fn iter(&self) -> impl Iterator<Item = &Name>
Iterates over the segments of this name from the base segment to this one, walking the parent links once so a name k segments deep costs O(k).
Sourcepub fn locations(&self) -> impl Iterator<Item = &Location>
pub fn locations(&self) -> impl Iterator<Item = &Location>
Returns all Location metadata for this name and all its parents. Parent locations come before child locations, and a location repeated by a later segment keeps its first position.
Sourcepub fn locs(&self) -> impl Iterator<Item = &Location>
pub fn locs(&self) -> impl Iterator<Item = &Location>
Locations specific to this name segment, excluding inherited
locations from parent segments. Use Self::locations for the
recursive view that also includes parents.
Trait Implementations§
impl Eq for Name
Auto Trait Implementations§
impl Freeze for Name
impl RefUnwindSafe for Name
impl Send for Name
impl Sync for Name
impl Unpin for Name
impl UnsafeUnpin for Name
impl UnwindSafe for Name
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> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§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.