pub enum Replacable<RuleKeyType: Clone + PartialEq + Debug, ResultType: Clone + PartialEq + Debug> {
Ready(ResultType),
Replace(RuleKeyType),
ImmediateMeta(RuleKeyType, ResultType),
DelayedMeta(RuleKeyType, ResultType),
}
Expand description
This defines a portion of a token stream that may be replaced using a rule, or might already be ready
Variants§
Ready(ResultType)
The value is already in it’s final form
Replace(RuleKeyType)
The value can be replaced by the provided rule
ImmediateMeta(RuleKeyType, ResultType)
The value is a meta rule for immediate processing
DelayedMeta(RuleKeyType, ResultType)
The value is a meta rule for delayed processing - basically aliasing the rule
Trait Implementations§
source§impl<RuleKeyType: Clone + Clone + PartialEq + Debug, ResultType: Clone + Clone + PartialEq + Debug> Clone for Replacable<RuleKeyType, ResultType>
impl<RuleKeyType: Clone + Clone + PartialEq + Debug, ResultType: Clone + Clone + PartialEq + Debug> Clone for Replacable<RuleKeyType, ResultType>
source§fn clone(&self) -> Replacable<RuleKeyType, ResultType>
fn clone(&self) -> Replacable<RuleKeyType, ResultType>
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<RuleKeyType: Debug + Clone + PartialEq + Debug, ResultType: Debug + Clone + PartialEq + Debug> Debug for Replacable<RuleKeyType, ResultType>
impl<RuleKeyType: Debug + Clone + PartialEq + Debug, ResultType: Debug + Clone + PartialEq + Debug> Debug for Replacable<RuleKeyType, ResultType>
source§impl<RuleKeyType: PartialEq + Clone + PartialEq + Debug, ResultType: PartialEq + Clone + PartialEq + Debug> PartialEq<Replacable<RuleKeyType, ResultType>> for Replacable<RuleKeyType, ResultType>
impl<RuleKeyType: PartialEq + Clone + PartialEq + Debug, ResultType: PartialEq + Clone + PartialEq + Debug> PartialEq<Replacable<RuleKeyType, ResultType>> for Replacable<RuleKeyType, ResultType>
source§fn eq(&self, other: &Replacable<RuleKeyType, ResultType>) -> bool
fn eq(&self, other: &Replacable<RuleKeyType, ResultType>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<RuleKeyType: Clone + PartialEq + Debug, ResultType: Clone + PartialEq + Debug> StructuralPartialEq for Replacable<RuleKeyType, ResultType>
Auto Trait Implementations§
impl<RuleKeyType, ResultType> RefUnwindSafe for Replacable<RuleKeyType, ResultType>where ResultType: RefUnwindSafe, RuleKeyType: RefUnwindSafe,
impl<RuleKeyType, ResultType> Send for Replacable<RuleKeyType, ResultType>where ResultType: Send, RuleKeyType: Send,
impl<RuleKeyType, ResultType> Sync for Replacable<RuleKeyType, ResultType>where ResultType: Sync, RuleKeyType: Sync,
impl<RuleKeyType, ResultType> Unpin for Replacable<RuleKeyType, ResultType>where ResultType: Unpin, RuleKeyType: Unpin,
impl<RuleKeyType, ResultType> UnwindSafe for Replacable<RuleKeyType, ResultType>where ResultType: UnwindSafe, RuleKeyType: 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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere T: Any,
§fn into_any(self: Box<T, Global>) -> Box<dyn Any, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any, Global>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T, Global>) -> Rc<dyn Any, Global>
fn into_any_rc(self: Rc<T, Global>) -> Rc<dyn Any, Global>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.