pub enum Quirk {
LineNumber,
}Expand description
Special characteristics of a variable
While most variables act as a simple store of a value, some variables
exhibit special effects when they get expanded or assigned to. Such
variables may have their value computed dynamically on expansion or may have
an internal state that is updated when the value is set. Quirk determines
the nature of a variable and contains the relevant state.
Use Variable::expand to apply the variable’s quirk when expanding a
variable.
Variants§
LineNumber
Quirk for the $LINENO variable
The value of a variable having this variant of Quirk is computed
dynamically from the expanding context. The result is the line number of
the location of the parameter expansion. This Quirk is lost when an
assignment sets a new value to the variable.
Trait Implementations§
impl Eq for Quirk
impl StructuralPartialEq for Quirk
Auto Trait Implementations§
impl Freeze for Quirk
impl RefUnwindSafe for Quirk
impl Send for Quirk
impl Sync for Quirk
impl Unpin for Quirk
impl UnwindSafe for Quirk
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