pub struct Identifier { /* private fields */ }
Expand description
Corresponds the grammar rule identifier
.
Implementations§
Source§impl Identifier
impl Identifier
pub fn new_unchecked(s: &str) -> Self
pub fn with_module(&self, module: Identifier) -> QualifiedIdentifier
pub fn with_member(&self, member: Identifier) -> QualifiedIdentifier
pub fn validate( &self, top: &Module, loader: &impl ModuleLoader, as_case: Option<IdentifierCaseConvention>, )
pub fn is_valid<S>(s: S) -> bool
pub fn is_keyword<S>(s: S) -> bool
pub fn is_keyword_in_constraint<S>(s: S) -> bool
pub fn is_type_name<S>(s: S) -> bool
pub fn is_library_module_name<S>(s: S) -> bool
pub fn eq_with_span(&self, other: &Self) -> bool
pub fn to_type_label(&self) -> String
pub fn to_variant_label(&self) -> String
pub fn to_member_label(&self) -> String
pub fn to_module_label(&self) -> String
Trait Implementations§
Source§impl AsRef<str> for Identifier
impl AsRef<str> for Identifier
Source§impl Clone for Identifier
impl Clone for Identifier
Source§fn clone(&self) -> Identifier
fn clone(&self) -> Identifier
Returns a duplicate 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 Debug for Identifier
impl Debug for Identifier
Source§impl<'de> Deserialize<'de> for Identifier
impl<'de> Deserialize<'de> for Identifier
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for Identifier
impl Display for Identifier
Source§impl From<&Identifier> for IdentifierReference
impl From<&Identifier> for IdentifierReference
Source§fn from(v: &Identifier) -> Self
fn from(v: &Identifier) -> Self
Converts to this type from the input type.
Source§impl From<&Identifier> for Import
impl From<&Identifier> for Import
Source§fn from(v: &Identifier) -> Self
fn from(v: &Identifier) -> Self
Converts to this type from the input type.
Source§impl From<&Identifier> for ModuleImport
impl From<&Identifier> for ModuleImport
Source§fn from(value: &Identifier) -> Self
fn from(value: &Identifier) -> Self
Converts to this type from the input type.
Source§impl From<&Identifier> for SequenceMember
impl From<&Identifier> for SequenceMember
Source§fn from(value: &Identifier) -> Self
fn from(value: &Identifier) -> Self
Converts to this type from the input type.
Source§impl From<&Identifier> for String
impl From<&Identifier> for String
Source§fn from(value: &Identifier) -> Self
fn from(value: &Identifier) -> Self
Converts to this type from the input type.
Source§impl From<&Identifier> for Subject
impl From<&Identifier> for Subject
Source§fn from(v: &Identifier) -> Self
fn from(v: &Identifier) -> Self
Converts to this type from the input type.
Source§impl From<&Identifier> for TypeReference
impl From<&Identifier> for TypeReference
Source§fn from(value: &Identifier) -> Self
fn from(value: &Identifier) -> Self
Converts to this type from the input type.
Source§impl From<&Identifier> for Value
impl From<&Identifier> for Value
Source§fn from(value: &Identifier) -> Self
fn from(value: &Identifier) -> Self
Converts to this type from the input type.
Source§impl From<Identifier> for IdentifierReference
impl From<Identifier> for IdentifierReference
Source§fn from(v: Identifier) -> Self
fn from(v: Identifier) -> Self
Converts to this type from the input type.
Source§impl From<Identifier> for Import
impl From<Identifier> for Import
Source§fn from(v: Identifier) -> Self
fn from(v: Identifier) -> Self
Converts to this type from the input type.
Source§impl From<Identifier> for ModuleImport
impl From<Identifier> for ModuleImport
Source§fn from(value: Identifier) -> Self
fn from(value: Identifier) -> Self
Converts to this type from the input type.
Source§impl From<Identifier> for SequenceMember
impl From<Identifier> for SequenceMember
Source§fn from(value: Identifier) -> Self
fn from(value: Identifier) -> Self
Converts to this type from the input type.
Source§impl From<Identifier> for String
impl From<Identifier> for String
Source§fn from(value: Identifier) -> Self
fn from(value: Identifier) -> Self
Converts to this type from the input type.
Source§impl From<Identifier> for Subject
impl From<Identifier> for Subject
Source§fn from(v: Identifier) -> Self
fn from(v: Identifier) -> Self
Converts to this type from the input type.
Source§impl From<Identifier> for Term
impl From<Identifier> for Term
Source§fn from(v: Identifier) -> Self
fn from(v: Identifier) -> Self
Converts to this type from the input type.
Source§impl From<Identifier> for TypeReference
impl From<Identifier> for TypeReference
Source§fn from(value: Identifier) -> Self
fn from(value: Identifier) -> Self
Converts to this type from the input type.
Source§impl From<Identifier> for Value
impl From<Identifier> for Value
Source§fn from(value: Identifier) -> Self
fn from(value: Identifier) -> Self
Converts to this type from the input type.
Source§impl FromStr for Identifier
impl FromStr for Identifier
Source§impl HasSourceSpan for Identifier
impl HasSourceSpan for Identifier
fn with_source_span(self, span: Span) -> Self
fn source_span(&self) -> Option<&Span>
fn set_source_span(&mut self, span: Span)
fn unset_source_span(&mut self)
fn has_source_span(&self) -> bool
Source§impl Hash for Identifier
impl Hash for Identifier
Source§impl Ord for Identifier
impl Ord for Identifier
Source§impl PartialEq<str> for Identifier
impl PartialEq<str> for Identifier
Source§impl PartialEq for Identifier
impl PartialEq for Identifier
Source§impl PartialOrd for Identifier
impl PartialOrd for Identifier
Source§impl Serialize for Identifier
impl Serialize for Identifier
impl Eq for Identifier
Auto Trait Implementations§
impl Freeze for Identifier
impl RefUnwindSafe for Identifier
impl Send for Identifier
impl Sync for Identifier
impl Unpin for Identifier
impl UnwindSafe for Identifier
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