pub enum GrammarProcessingDirection {
BreadthFirst,
DepthFirst,
}
Expand description
This sets the direction of processing for the grammar
Variants§
BreadthFirst
Breadth first means it first iterates once through an entire stream - only making initial replacements, but not processing their values yet. It then is able to apply the next iteration - until it either reaches a maximum depth or stabilizes.
DepthFirst
Depth first means it goes in sequence through the stream, and each time it is able to make a replacement it replaces it as far as it can go. This will not evolve, and cannot detect new emergent patterns in a stream, but can be very effective for specific contexts like text generation.
Trait Implementations§
source§impl Clone for GrammarProcessingDirection
impl Clone for GrammarProcessingDirection
source§fn clone(&self) -> GrammarProcessingDirection
fn clone(&self) -> GrammarProcessingDirection
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 Debug for GrammarProcessingDirection
impl Debug for GrammarProcessingDirection
source§impl Default for GrammarProcessingDirection
impl Default for GrammarProcessingDirection
impl Copy for GrammarProcessingDirection
Auto Trait Implementations§
impl RefUnwindSafe for GrammarProcessingDirection
impl Send for GrammarProcessingDirection
impl Sync for GrammarProcessingDirection
impl Unpin for GrammarProcessingDirection
impl UnwindSafe for GrammarProcessingDirection
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.§impl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere T: Default,
§fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Creates
Self
using data from the given [World
].