pub enum TemplateSegment {
Literal(String),
RuleRef(String),
MarkovRef {
corpus: String,
tag: String,
},
EntityField {
field: String,
},
PronounRef {
role: String,
},
}Expand description
A segment of a parsed template.
Variants§
Literal(String)
Literal text, emitted as-is.
RuleRef(String)
Reference to another grammar rule: {rule_name}.
MarkovRef
Reference to a Markov generator: {markov:corpus:tag}.
EntityField
Entity field interpolation: {entity.field}.
PronounRef
Pronoun-aware entity reference: {subject}, {object}, {possessive}.
Trait Implementations§
Source§impl Clone for TemplateSegment
impl Clone for TemplateSegment
Source§fn clone(&self) -> TemplateSegment
fn clone(&self) -> TemplateSegment
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 moreSource§impl Debug for TemplateSegment
impl Debug for TemplateSegment
Source§impl<'de> Deserialize<'de> for TemplateSegment
impl<'de> Deserialize<'de> for TemplateSegment
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for TemplateSegment
impl PartialEq for TemplateSegment
Source§impl Serialize for TemplateSegment
impl Serialize for TemplateSegment
impl StructuralPartialEq for TemplateSegment
Auto Trait Implementations§
impl Freeze for TemplateSegment
impl RefUnwindSafe for TemplateSegment
impl Send for TemplateSegment
impl Sync for TemplateSegment
impl Unpin for TemplateSegment
impl UnsafeUnpin for TemplateSegment
impl UnwindSafe for TemplateSegment
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