pub struct RuleAttributes {
pub max_tokens: i32,
pub max_chars: i32,
pub capture_name: String,
pub suffix_stop_info: SuffixStopInfo,
pub is_lazy: bool,
pub temperature: Option<f32>,
}Expand description
Rule attributes attached to a rule-definition identifier by the lexer.
Fields§
§max_tokens: i32The token budget, or -1.
max_chars: i32The character budget, or -1.
capture_name: StringThe capture name, or empty.
suffix_stop_info: SuffixStopInfoThe capture-hidden suffix/stop metadata (the rule_id field is unused).
is_lazy: boolWhether the rule is lazy (committed-shortest).
temperature: Option<f32>The sampling temperature.
Trait Implementations§
Source§impl Clone for RuleAttributes
impl Clone for RuleAttributes
Source§impl Debug for RuleAttributes
impl Debug for RuleAttributes
Source§impl PartialEq for RuleAttributes
impl PartialEq for RuleAttributes
impl StructuralPartialEq for RuleAttributes
Auto Trait Implementations§
impl Freeze for RuleAttributes
impl RefUnwindSafe for RuleAttributes
impl Send for RuleAttributes
impl Sync for RuleAttributes
impl Unpin for RuleAttributes
impl UnsafeUnpin for RuleAttributes
impl UnwindSafe for RuleAttributes
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more