pub struct GenerationPlanV2 {
pub generation: GenerationPlan,
pub grammar: Option<GrammarPlanV2>,
}Expand description
Version-two generation mechanics with explicit eager or lazy grammar.
The embedded v1 generation plan must not select its eager grammar. This
prevents the new contract from reinterpreting generation-plan-v1 while
reusing all unchanged sampler, bias, stop, and bound mechanics.
Fields§
§generation: GenerationPlanComplete unchanged v1 sampler, bias, stop, and token-bound mechanics.
grammar: Option<GrammarPlanV2>Optional version-two eager or lazy grammar.
Implementations§
Trait Implementations§
Source§impl Clone for GenerationPlanV2
impl Clone for GenerationPlanV2
Source§fn clone(&self) -> GenerationPlanV2
fn clone(&self) -> GenerationPlanV2
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 GenerationPlanV2
impl Debug for GenerationPlanV2
Source§impl<'de> Deserialize<'de> for GenerationPlanV2
impl<'de> Deserialize<'de> for GenerationPlanV2
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<GenerationPlanV2, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<GenerationPlanV2, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for GenerationPlanV2
impl PartialEq for GenerationPlanV2
Source§impl Serialize for GenerationPlanV2
impl Serialize for GenerationPlanV2
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for GenerationPlanV2
Auto Trait Implementations§
impl Freeze for GenerationPlanV2
impl RefUnwindSafe for GenerationPlanV2
impl Send for GenerationPlanV2
impl Sync for GenerationPlanV2
impl Unpin for GenerationPlanV2
impl UnsafeUnpin for GenerationPlanV2
impl UnwindSafe for GenerationPlanV2
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