pub enum SimpleWord<L, P, S> {
Literal(L),
Escaped(L),
Param(P),
Subst(S),
Star,
Question,
SquareOpen,
SquareClose,
Tilde,
Colon,
}
Expand description
Represents the smallest fragment of any text.
Generic over the representation of a literals, parameters, and substitutions.
Variants§
Literal(L)
A non-special literal word.
Escaped(L)
A token which normally has a special meaning is treated as a literal
because it was escaped, typically with a backslash, e.g. \"
.
Param(P)
Access of a value inside a parameter, e.g. $foo
or $$
.
Subst(S)
A parameter substitution, e.g. ${param-word}
.
Star
Represents *
, useful for handling pattern expansions.
Question
Represents ?
, useful for handling pattern expansions.
SquareOpen
Represents [
, useful for handling pattern expansions.
SquareClose
Represents ]
, useful for handling pattern expansions.
Tilde
Represents ~
, useful for handling tilde expansions.
Colon
Represents :
, useful for handling tilde expansions.
Trait Implementations§
Source§impl<L: Clone, P: Clone, S: Clone> Clone for SimpleWord<L, P, S>
impl<L: Clone, P: Clone, S: Clone> Clone for SimpleWord<L, P, S>
Source§fn clone(&self) -> SimpleWord<L, P, S>
fn clone(&self) -> SimpleWord<L, P, 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 moreimpl<L: Eq, P: Eq, S: Eq> Eq for SimpleWord<L, P, S>
impl<L, P, S> StructuralPartialEq for SimpleWord<L, P, S>
Auto Trait Implementations§
impl<L, P, S> Freeze for SimpleWord<L, P, S>
impl<L, P, S> RefUnwindSafe for SimpleWord<L, P, S>
impl<L, P, S> Send for SimpleWord<L, P, S>
impl<L, P, S> Sync for SimpleWord<L, P, S>
impl<L, P, S> Unpin for SimpleWord<L, P, S>
impl<L, P, S> UnwindSafe for SimpleWord<L, P, S>
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