pub struct VariableName<S>{ /* private fields */ }Expand description
A thin wrapper over a String for names used by the source info table
Implementations§
Source§impl<S> VariableName<S>
impl<S> VariableName<S>
pub fn new(name: S, name_is_literal: bool) -> VariableName<S>
pub fn new_non_literal(name: S) -> VariableName<S>
pub fn new_literal(name: S) -> VariableName<S>
pub fn into_inner(self) -> S
pub fn as_str(&self) -> &str
Sourcepub fn flip_is_literal(&mut self)
pub fn flip_is_literal(&mut self)
flips the name_is_literal bool. should only be used when searching for a value in a hashmap
pub fn set_is_literal(&mut self)
pub fn unset_is_literal(&mut self)
Trait Implementations§
Source§impl<S> Clone for VariableName<S>
impl<S> Clone for VariableName<S>
Source§fn clone(&self) -> VariableName<S>
fn clone(&self) -> VariableName<S>
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<S> Debug for VariableName<S>
impl<S> Debug for VariableName<S>
Source§impl<S> Display for VariableName<S>
impl<S> Display for VariableName<S>
Source§impl<S> Hash for VariableName<S>
impl<S> Hash for VariableName<S>
Source§impl<S> Ord for VariableName<S>
impl<S> Ord for VariableName<S>
Source§fn cmp(&self, other: &VariableName<S>) -> Ordering
fn cmp(&self, other: &VariableName<S>) -> 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<S> PartialEq for VariableName<S>
impl<S> PartialEq for VariableName<S>
Source§impl<S> PartialOrd for VariableName<S>
impl<S> PartialOrd for VariableName<S>
impl<S> Copy for VariableName<S>
impl<S> Eq for VariableName<S>
impl<S> StructuralPartialEq for VariableName<S>
Auto Trait Implementations§
impl<S> Freeze for VariableName<S>where
S: Freeze,
impl<S> RefUnwindSafe for VariableName<S>where
S: RefUnwindSafe,
impl<S> Send for VariableName<S>where
S: Send,
impl<S> Sync for VariableName<S>where
S: Sync,
impl<S> Unpin for VariableName<S>where
S: Unpin,
impl<S> UnwindSafe for VariableName<S>where
S: UnwindSafe,
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<T> CallHasher for T
impl<T> CallHasher for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§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