pub struct ExprIdentifier(pub String, pub IdentifierKind, pub Option<Type>);Tuple Fields§
§0: String§1: IdentifierKind§2: Option<Type>Implementations§
Source§impl ExprIdentifier
impl ExprIdentifier
pub fn new(identifier: &str) -> Self
pub fn get_identifier_kind(identifier: &str) -> IdentifierKind
Sourcepub fn full_name(&self) -> &str
pub fn full_name(&self) -> &str
The full name of the identifier from the source code
This is different from [Self::name] as it always includes a sigil prefix for variables, prompts, secrets, and client identifiers.
Sourcepub fn lookup_name(&self) -> &str
pub fn lookup_name(&self) -> &str
The look up name for the identifier
For builtins this is just the identifier name
For variables, prompts, secrets, and client identifiers, it returns the non sigil prefix version of the identifier.
- builtin_fn => builtin_fn
- :variable => variable
- ?prompt => prompt
- !secret => secret
- @client => client
pub fn identifier_kind(&self) -> &IdentifierKind
pub fn get_type(&self) -> &Option<Type>
Trait Implementations§
Source§impl Debug for ExprIdentifier
impl Debug for ExprIdentifier
Source§impl PartialEq for ExprIdentifier
impl PartialEq for ExprIdentifier
Source§fn eq(&self, other: &ExprIdentifier) -> bool
fn eq(&self, other: &ExprIdentifier) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ExprIdentifier
Auto Trait Implementations§
impl Freeze for ExprIdentifier
impl RefUnwindSafe for ExprIdentifier
impl Send for ExprIdentifier
impl Sync for ExprIdentifier
impl Unpin for ExprIdentifier
impl UnsafeUnpin for ExprIdentifier
impl UnwindSafe for ExprIdentifier
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