pub trait GrammarMasker {
// Required method
fn mask(&self, recent: &[Token], vocab: usize) -> Vec<bool>;
}Expand description
Grammar Constraint port (llguidance — context 4). Returns a per-token allow
mask of length vocab; true = legal this step.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".