Struct ra_ap_hir_expand::name::Name [−][src]
pub struct Name(_);
Expand description
Name
is a wrapper around string, which is used in hir for both references
and declarations. In theory, names should also carry hygiene info, but we are
not there yet!
Implementations
impl Name
[src]
impl Name
[src]pub fn new_tuple_field(idx: usize) -> Name
[src]
pub fn new_lifetime(lt: &Lifetime) -> Name
[src]
pub fn missing() -> Name
[src]
pub fn missing() -> Name
[src]A fake name for things missing in the source code.
For example, impl Foo for {}
should be treated as a trait impl for a
type with a missing name. Similarly, struct S { : u32 }
should have a
single field with a missing name.
Ideally, we want a gensym
semantics for missing names – each missing
name is equal only to itself. It’s not clear how to implement this in
salsa though, so we punt on that bit for a moment.
pub fn as_tuple_index(&self) -> Option<usize>
[src]
Trait Implementations
impl Ord for Name
[src]
impl Ord for Name
[src]impl PartialOrd<Name> for Name
[src]
impl PartialOrd<Name> for Name
[src]fn partial_cmp(&self, other: &Name) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &Name) -> Option<Ordering>
[src]This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Eq for Name
[src]
impl StructuralEq for Name
[src]
impl StructuralPartialEq for Name
[src]
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
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
[src]
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
[src]pub fn equivalent(&self, key: &K) -> bool
[src]
pub fn equivalent(&self, key: &K) -> bool
[src]Compare self to key
and return true
if they are equal.
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more