pub struct QualifiedNameExt {
pub parts: Vec<String>,
}Expand description
A dot-separated qualified name (e.g. Nat.succ).
Fields§
§parts: Vec<String>Component parts of the name.
Implementations§
Source§impl QualifiedNameExt
impl QualifiedNameExt
Sourcepub fn from_dot_str(s: &str) -> Self
pub fn from_dot_str(s: &str) -> Self
Creates a qualified name from a dot-separated string.
Sourcepub fn unqualified(&self) -> &str
pub fn unqualified(&self) -> &str
Returns the last component (unqualified name).
Sourcepub fn namespace(&self) -> Option<QualifiedNameExt>
pub fn namespace(&self) -> Option<QualifiedNameExt>
Returns the namespace (all but the last component), or None.
Sourcepub fn is_sub_of(&self, other: &QualifiedNameExt) -> bool
pub fn is_sub_of(&self, other: &QualifiedNameExt) -> bool
Returns true if this name is a sub-name of other.
Trait Implementations§
Source§impl Display for QualifiedNameExt
impl Display for QualifiedNameExt
Auto Trait Implementations§
impl Freeze for QualifiedNameExt
impl RefUnwindSafe for QualifiedNameExt
impl Send for QualifiedNameExt
impl Sync for QualifiedNameExt
impl Unpin for QualifiedNameExt
impl UnsafeUnpin for QualifiedNameExt
impl UnwindSafe for QualifiedNameExt
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