pub enum VariableName<S = String> {
Pseudo(Span<S>),
Global(Span<S>),
User(Span<S>),
}
Variants§
Implementations§
Source§impl<S> VariableName<S>
impl<S> VariableName<S>
pub fn map<T, F>(self, f: F) -> VariableName<T>where
F: FnMut(S) -> T,
Source§impl<S> VariableName<S>
impl<S> VariableName<S>
pub fn into_inner(self) -> S
pub fn to_global(self) -> Self
Trait Implementations§
Source§impl<S: Clone> Clone for VariableName<S>
impl<S: Clone> Clone for VariableName<S>
Source§fn clone(&self) -> VariableName<S>
fn clone(&self) -> VariableName<S>
Returns a copy 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> Debug for VariableName<S>
impl<S: Debug> Debug for VariableName<S>
Source§impl<S: Ord> Ord for VariableName<S>
impl<S: Ord> 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> PartialEq for VariableName<S>
impl<S: PartialEq> PartialEq for VariableName<S>
Source§impl<S: PartialOrd> PartialOrd for VariableName<S>
impl<S: PartialOrd> PartialOrd for VariableName<S>
Source§impl<S> Spanned for VariableName<S>
impl<S> Spanned for VariableName<S>
Source§impl<S> ValueParser for VariableName<S>
impl<S> ValueParser for VariableName<S>
type Value<'a> = VariableName<<S as ValueParser>::Value<'a>>
fn try_parse(input: Span<&str>) -> DiagResult<Self::Value<'_>>
impl<S: Copy> Copy for VariableName<S>
impl<S: Eq> 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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