pub struct Name(Id, Vec<Atom<JsWordStaticSet>, Global>);
Expand description
Efficient alternative for names with variable length like foo.bar.baz.qux
.
Tuple Fields
0: Id
1: Vec<Atom<JsWordStaticSet>, Global>
Implementations
sourceimpl Name
impl Name
pub fn new(name: Atom<JsWordStaticSet>, ctxt: SyntaxContext) -> Name
pub const fn get_ctxt(&self) -> SyntaxContext
pub fn push(&mut self, sym: Atom<JsWordStaticSet>)
pub fn top(&self) -> Id
pub fn len(&self) -> usize
pub const fn is_empty(&self) -> bool
pub fn inner(&self) -> (&Id, &[Atom<JsWordStaticSet>])
pub fn last(&self) -> &Atom<JsWordStaticSet>
pub fn slice_to(&self, end: usize) -> Name
Trait Implementations
sourceimpl From<&RTsEntityName> for Name
impl From<&RTsEntityName> for Name
sourcefn from(n: &RTsEntityName) -> Name
fn from(n: &RTsEntityName) -> Name
Converts to this type from the input type.
sourceimpl From<&RTsThisTypeOrIdent> for Name
impl From<&RTsThisTypeOrIdent> for Name
sourcefn from(ty: &RTsThisTypeOrIdent) -> Name
fn from(ty: &RTsThisTypeOrIdent) -> Name
Converts to this type from the input type.
sourceimpl From<RTsEntityName> for Name
impl From<RTsEntityName> for Name
sourcefn from(n: RTsEntityName) -> Name
fn from(n: RTsEntityName) -> Name
Converts to this type from the input type.
sourceimpl From<RTsThisType> for Name
impl From<RTsThisType> for Name
sourcefn from(this: RTsThisType) -> Name
fn from(this: RTsThisType) -> Name
Converts to this type from the input type.
sourceimpl Ord for Name
impl Ord for Name
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialOrd<Name> for Name
impl PartialOrd<Name> for Name
sourcefn partial_cmp(&self, other: &Name) -> Option<Ordering>
fn partial_cmp(&self, other: &Name) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresourceimpl<'a> TryFrom<&'a RMemberExpr> for Name
impl<'a> TryFrom<&'a RMemberExpr> for Name
impl Eq for Name
impl StructuralEq for Name
impl StructuralPartialEq for Name
Auto Trait Implementations
impl RefUnwindSafe for Name
impl Send for Name
impl Sync for Name
impl Unpin for Name
impl UnwindSafe for Name
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> CallHasher for Twhere
T: Hash + ?Sized,
impl<T> CallHasher for Twhere
T: Hash + ?Sized,
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.