pub struct BinderIdent { /* private fields */ }Expand description
An indentifier that tracks both its raw (display) string, and its normalized form.
Implementations§
Source§impl BinderIdent
impl BinderIdent
pub fn new(raw: impl Into<String>, quoted: bool) -> Self
pub fn is_quoted(&self) -> bool
Sourcepub fn as_normalized_str(&self) -> &str
pub fn as_normalized_str(&self) -> &str
Get the normalized string.
Sourcepub fn as_raw_str(&self) -> &str
pub fn as_raw_str(&self) -> &str
Get the original string.
Should not be used for comparisons.
Sourcepub fn strict_eq(&self, other: &BinderIdent) -> bool
pub fn strict_eq(&self, other: &BinderIdent) -> bool
Does a strict equality check by comparing the raw strings if other is
quoted.
If other is not quoted, then the normalized values are compared.
Trait Implementations§
Source§impl Borrow<str> for BinderIdent
impl Borrow<str> for BinderIdent
Source§impl Clone for BinderIdent
impl Clone for BinderIdent
Source§impl Debug for BinderIdent
impl Debug for BinderIdent
Source§impl<'de> Deserialize<'de> for BinderIdent
impl<'de> Deserialize<'de> for BinderIdent
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 BinderIdent
impl Display for BinderIdent
impl Eq for BinderIdent
Source§impl From<&str> for BinderIdent
impl From<&str> for BinderIdent
Source§impl From<Ident> for BinderIdent
impl From<Ident> for BinderIdent
Source§impl From<String> for BinderIdent
impl From<String> for BinderIdent
Source§impl Hash for BinderIdent
impl Hash for BinderIdent
Source§impl PartialEq for BinderIdent
impl PartialEq for BinderIdent
Auto Trait Implementations§
impl Freeze for BinderIdent
impl RefUnwindSafe for BinderIdent
impl Send for BinderIdent
impl Sync for BinderIdent
impl Unpin for BinderIdent
impl UnsafeUnpin for BinderIdent
impl UnwindSafe for BinderIdent
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> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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
Compares
self to key and returns true if they are equal.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§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.