pub struct StructuralTagItem {
pub begin: String,
pub schema: String,
pub end: String,
}Expand description
A structural tag item. See crate::Grammar::from_structural_tag for more details.
The structural tag handles the dispatching of different grammars based on the tags and triggers: it initially allows any output, until a trigger is encountered, then dispatch to the corresponding tag; when the end tag is encountered, the grammar will allow any following output, until the next trigger is encountered.
Fields
begin: The begin tag.schema: The schema (JSON schema as a string).end: The end tag.
Fields§
§begin: String§schema: String§end: StringImplementations§
Trait Implementations§
Source§impl Clone for StructuralTagItem
impl Clone for StructuralTagItem
Source§fn clone(&self) -> StructuralTagItem
fn clone(&self) -> StructuralTagItem
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 moreAuto Trait Implementations§
impl Freeze for StructuralTagItem
impl RefUnwindSafe for StructuralTagItem
impl Send for StructuralTagItem
impl Sync for StructuralTagItem
impl Unpin for StructuralTagItem
impl UnwindSafe for StructuralTagItem
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