pub struct Identifier(pub Refer<Id>);Expand description
µcad identifier
Tuple Fields§
§0: Refer<Id>Implementations§
Source§impl Identifier
impl Identifier
Sourcepub fn unique() -> Self
pub fn unique() -> Self
Create new identifier with a new unique name.
Every call will return a new identifier (which is a $ followed by an counter)
Sourcepub fn validate(self) -> ParseResult<Self>
pub fn validate(self) -> ParseResult<Self>
check if this is a valid identifier (contains only A-Z, a-z or _)
Sourcepub fn with_prefix(&self, prefix: &QualifiedName) -> QualifiedName
pub fn with_prefix(&self, prefix: &QualifiedName) -> QualifiedName
Add given prefix to identifier to get qualified name.
Sourcepub fn detect_case(&self) -> Case
pub fn detect_case(&self) -> Case
Detect if the identifier matches a certain case.
Trait Implementations§
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 Default for Identifier
impl Default for Identifier
Source§fn default() -> Identifier
fn default() -> Identifier
Returns the “default value” for a type. Read more
Source§impl Display for Identifier
impl Display for Identifier
Source§impl<'a> From<&'a Identifier> for &'a str
impl<'a> From<&'a Identifier> for &'a str
Source§fn from(value: &'a Identifier) -> Self
fn from(value: &'a Identifier) -> Self
Converts to this type from the input type.
Source§impl From<&Identifier> for QualifiedName
impl From<&Identifier> for QualifiedName
Source§fn from(id: &Identifier) -> Self
fn from(id: &Identifier) -> Self
Converts to this type from the input type.
Source§impl From<&OsStr> for Identifier
impl From<&OsStr> for Identifier
Source§impl From<&str> for Identifier
impl From<&str> for Identifier
Source§impl From<Identifier> for QualifiedName
impl From<Identifier> for QualifiedName
Source§fn from(id: Identifier) -> Self
fn from(id: Identifier) -> Self
Converts to this type from the input type.
Source§impl FromIterator<Identifier> for IdentifierList
impl FromIterator<Identifier> for IdentifierList
Source§fn from_iter<T: IntoIterator<Item = Identifier>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = Identifier>>(iter: T) -> Self
Creates a value from an iterator. Read more
Source§impl FromIterator<Identifier> for QualifiedName
impl FromIterator<Identifier> for QualifiedName
Source§fn from_iter<T: IntoIterator<Item = Identifier>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = Identifier>>(iter: T) -> Self
Creates a value from an iterator. Read more
Source§impl FromStr for Identifier
impl FromStr for Identifier
Source§impl Hash for Identifier
impl Hash for Identifier
Source§impl Index<&Identifier> for ArgumentList
impl Index<&Identifier> for ArgumentList
Source§impl Ord for Identifier
impl Ord for Identifier
Source§fn cmp(&self, other: &Identifier) -> Ordering
fn cmp(&self, other: &Identifier) -> Ordering
1.21.0 · 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 OrdMapValue<Identifier> for Argument
impl OrdMapValue<Identifier> for Argument
Source§fn key(&self) -> Option<Identifier>
fn key(&self) -> Option<Identifier>
return some unique key of this value or
NoneSource§impl OrdMapValue<Identifier> for Parameter
impl OrdMapValue<Identifier> for Parameter
Source§fn key(&self) -> Option<Identifier>
fn key(&self) -> Option<Identifier>
return some unique key of this value or
NoneSource§impl Parse for Identifier
impl Parse for Identifier
fn parse(pair: Pair<'_>) -> ParseResult<Self>
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 SrcReferrer for Identifier
impl SrcReferrer for Identifier
Source§impl TreeDisplay for Identifier
impl TreeDisplay for Identifier
Source§fn tree_print(&self, f: &mut Formatter<'_>, depth: TreeState) -> Result
fn tree_print(&self, f: &mut Formatter<'_>, depth: TreeState) -> Result
Write item into
f and use {:depth$} syntax in front of your single line
output to get proper indention.Source§fn display_tree(&self, f: &mut Formatter<'_>) -> Result
fn display_tree(&self, f: &mut Formatter<'_>) -> Result
Display as tree starting at depth
0.Source§fn debug_tree(&self, f: &mut Formatter<'_>) -> Result
fn debug_tree(&self, f: &mut Formatter<'_>) -> Result
Display as tree starting at given depth in debug mode
impl Eq for Identifier
impl StructuralPartialEq 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more