pub struct LocIdent {
pub pos: TermPos,
/* private fields */
}Expand description
An identifier with a location.
The location is ignored for equality comparison and hashing; it’s mainly intended for error messages.
Fields§
§pos: TermPosImplementations§
Source§impl LocIdent
impl LocIdent
pub fn new_with_pos(label: impl AsRef<str>, pos: TermPos) -> Self
pub fn new(label: impl AsRef<str>) -> Self
Sourcepub fn with_pos(self, pos: TermPos) -> LocIdent
pub fn with_pos(self, pos: TermPos) -> LocIdent
Create an identifier with the same label as this one, but a specified position.
Sourcepub fn fresh() -> Self
pub fn fresh() -> Self
Create a fresh identifier with no position. See Ident::fresh.
pub fn into_label(self) -> String
Sourcepub fn is_generated(&self) -> bool
pub fn is_generated(&self) -> bool
Checks whether this identifier was generated by Ident::fresh.
Note that this is not optimized for speed: it involves taking a lock and looking up a table.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for LocIdent
impl<'de> Deserialize<'de> for LocIdent
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 Ord for LocIdent
impl Ord for LocIdent
Source§impl PartialOrd for LocIdent
impl PartialOrd for LocIdent
impl Allocable for LocIdent
impl Copy for LocIdent
impl Eq for LocIdent
Auto Trait Implementations§
impl Freeze for LocIdent
impl RefUnwindSafe for LocIdent
impl Send for LocIdent
impl Sync for LocIdent
impl Unpin for LocIdent
impl UnsafeUnpin for LocIdent
impl UnwindSafe for LocIdent
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 more