pub struct Identifier<'arena> {
pub span: Span,
pub value: &'arena str,
}Fields§
§span: Span§value: &'arena strImplementations§
Source§impl<'arena> Identifier<'arena>
impl<'arena> Identifier<'arena>
Sourcepub fn from_token(token: TypeToken<'arena>, file_id: FileId) -> Self
pub fn from_token(token: TypeToken<'arena>, file_id: FileId) -> Self
Creates an Identifier from a TypeToken and file_id.
Trait Implementations§
Source§impl<'arena> Clone for Identifier<'arena>
impl<'arena> Clone for Identifier<'arena>
Source§fn clone(&self) -> Identifier<'arena>
fn clone(&self) -> Identifier<'arena>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'arena> Debug for Identifier<'arena>
impl<'arena> Debug for Identifier<'arena>
Source§impl Display for Identifier<'_>
impl Display for Identifier<'_>
Source§impl HasSpan for Identifier<'_>
impl HasSpan for Identifier<'_>
Source§fn start_position(&self) -> Position
fn start_position(&self) -> Position
A convenience method to get the starting position of the span.
Source§fn start_offset(&self) -> u32
fn start_offset(&self) -> u32
A convenience method to get the starting byte offset of the span.
Source§fn end_position(&self) -> Position
fn end_position(&self) -> Position
A convenience method to get the ending position of the span.
Source§fn end_offset(&self) -> u32
fn end_offset(&self) -> u32
A convenience method to get the ending byte offset of the span.
Source§impl<'arena> Hash for Identifier<'arena>
impl<'arena> Hash for Identifier<'arena>
Source§impl<'arena> Ord for Identifier<'arena>
impl<'arena> Ord for Identifier<'arena>
Source§fn cmp(&self, other: &Identifier<'arena>) -> Ordering
fn cmp(&self, other: &Identifier<'arena>) -> Ordering
1.21.0 (const: unstable) · 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<'arena> PartialEq for Identifier<'arena>
impl<'arena> PartialEq for Identifier<'arena>
Source§fn eq(&self, other: &Identifier<'arena>) -> bool
fn eq(&self, other: &Identifier<'arena>) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl<'arena> PartialOrd for Identifier<'arena>
impl<'arena> PartialOrd for Identifier<'arena>
Source§impl<'arena> Serialize for Identifier<'arena>
impl<'arena> Serialize for Identifier<'arena>
impl<'arena> Copy for Identifier<'arena>
impl<'arena> Eq for Identifier<'arena>
impl<'arena> StructuralPartialEq for Identifier<'arena>
Auto Trait Implementations§
impl<'arena> Freeze for Identifier<'arena>
impl<'arena> RefUnwindSafe for Identifier<'arena>
impl<'arena> Send for Identifier<'arena>
impl<'arena> Sync for Identifier<'arena>
impl<'arena> Unpin for Identifier<'arena>
impl<'arena> UnsafeUnpin for Identifier<'arena>
impl<'arena> UnwindSafe for Identifier<'arena>
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> HasPosition for Twhere
T: HasSpan,
impl<T> HasPosition for Twhere
T: HasSpan,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more