pub enum Ident {
Rust(&'static RustIdent),
Script(ScriptIdent),
}Expand description
An identifier within the Rust or Script code: let identifier = 10;.
You can retrieve the actual string of the identifier using the Display,
Debug, and AsRef
Unlike Origin and ScriptOrigin, the identifier’s string does not become obsolete or change even if the underlying Script source code has been modified. This object holds a copy of the string as it was at the time of the identifier’s creation.
Variants§
Rust(&'static RustIdent)
An identifier declared in the Rust source code.
Script(ScriptIdent)
An identifier declared in the Script source code.
Implementations§
Trait Implementations§
impl Eq for Ident
Source§impl From<ScriptIdent> for Ident
impl From<ScriptIdent> for Ident
Source§fn from(value: ScriptIdent) -> Self
fn from(value: ScriptIdent) -> Self
Converts to this type from the input type.
Source§impl Ord for Ident
impl Ord for Ident
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 PartialOrd for Ident
impl PartialOrd for Ident
impl StructuralPartialEq for Ident
Auto Trait Implementations§
impl Freeze for Ident
impl RefUnwindSafe for Ident
impl Send for Ident
impl Sync for Ident
impl Unpin for Ident
impl UnsafeUnpin for Ident
impl UnwindSafe for Ident
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<S> Scannable for S
impl<S> Scannable for S
Source§fn stream<T>(&self) -> TokenStream<'_, T>where
T: Token,
fn stream<T>(&self) -> TokenStream<'_, T>where
T: Token,
Source§fn chunks<T>(&self) -> ChunkScanner<'_, T>where
T: Token,
fn chunks<T>(&self) -> ChunkScanner<'_, T>where
T: Token,
Source§fn chunk_indices<T>(&self) -> ChunkIndicesScanner<'_, T>where
T: Token,
fn chunk_indices<T>(&self) -> ChunkIndicesScanner<'_, T>where
T: Token,
Creates an iterator that scans source code tokens one by one, yielding
their Chunks and byte positions. Read more
Source§fn tokens<T>(&self) -> TokenScanner<'_, T>where
T: Token,
fn tokens<T>(&self) -> TokenScanner<'_, T>where
T: Token,
Creates an iterator that scans source code tokens one by one. Read more
Source§fn token_indices<T>(&self) -> TokenIndicesScanner<'_, T>where
T: Token,
fn token_indices<T>(&self) -> TokenIndicesScanner<'_, T>where
T: Token,
Creates an iterator that scans source code tokens one by one, and
their byte positions. Read more
Source§impl<S> StringEstimation for S
impl<S> StringEstimation for S
Source§impl<S> TerminalString for S
impl<S> TerminalString for S
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more