Struct sway_types::ident::Ident
source · [−]pub struct Ident { /* private fields */ }
Expand description
An Ident is an identifier with a corresponding span
from which it was derived.
Implementations
sourceimpl Ident
impl Ident
pub fn as_str(&self) -> &str
pub fn is_raw_ident(&self) -> bool
pub fn new(span: Span) -> Ident
pub fn new_no_trim(span: Span) -> Ident
pub fn new_with_raw(span: Span, is_raw_ident: bool) -> Ident
pub fn new_with_override(name_override: &'static str, span: Span) -> Ident
pub fn new_no_span(name: &'static str) -> Ident
Trait Implementations
sourceimpl Ord for Ident
impl Ord for Ident
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) -> Self where
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<Ident> for Ident
impl PartialEq<Ident> for Ident
sourceimpl PartialOrd<Ident> for Ident
impl PartialOrd<Ident> for Ident
sourcefn partial_cmp(&self, other: &Self) -> Option<Ordering>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
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 more
impl Eq for Ident
Auto Trait Implementations
impl RefUnwindSafe for Ident
impl Send for Ident
impl Sync for Ident
impl Unpin for Ident
impl UnwindSafe for Ident
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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