Struct ra_ap_hir_expand::name::UnescapedName
source · pub struct UnescapedName<'a>(/* private fields */);
Expand description
Wrapper of Name
to print the name without “r#” even when it is a raw identifier.
Implementations§
source§impl UnescapedName<'_>
impl UnescapedName<'_>
sourcepub fn to_smol_str(&self) -> SmolStr
pub fn to_smol_str(&self) -> SmolStr
Returns the textual representation of this name as a SmolStr
. Prefer using this over
ToString::to_string
if possible as this conversion is cheaper in the general case.
pub fn display(&self, db: &dyn ExpandDatabase) -> impl Display + '_
Trait Implementations§
source§impl<'a> Clone for UnescapedName<'a>
impl<'a> Clone for UnescapedName<'a>
source§fn clone(&self) -> UnescapedName<'a>
fn clone(&self) -> UnescapedName<'a>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<'a> Debug for UnescapedName<'a>
impl<'a> Debug for UnescapedName<'a>
source§impl<'a> Hash for UnescapedName<'a>
impl<'a> Hash for UnescapedName<'a>
source§impl<'a> Ord for UnescapedName<'a>
impl<'a> Ord for UnescapedName<'a>
source§fn cmp(&self, other: &UnescapedName<'a>) -> Ordering
fn cmp(&self, other: &UnescapedName<'a>) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<'a> PartialEq for UnescapedName<'a>
impl<'a> PartialEq for UnescapedName<'a>
source§fn eq(&self, other: &UnescapedName<'a>) -> bool
fn eq(&self, other: &UnescapedName<'a>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'a> PartialOrd for UnescapedName<'a>
impl<'a> PartialOrd for UnescapedName<'a>
source§fn partial_cmp(&self, other: &UnescapedName<'a>) -> Option<Ordering>
fn partial_cmp(&self, other: &UnescapedName<'a>) -> Option<Ordering>
1.0.0 · source§fn 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 moreimpl<'a> Eq for UnescapedName<'a>
impl<'a> StructuralPartialEq for UnescapedName<'a>
Auto Trait Implementations§
impl<'a> Freeze for UnescapedName<'a>
impl<'a> RefUnwindSafe for UnescapedName<'a>
impl<'a> Send for UnescapedName<'a>
impl<'a> Sync for UnescapedName<'a>
impl<'a> Unpin for UnescapedName<'a>
impl<'a> UnwindSafe for UnescapedName<'a>
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.