pub struct TokenTarget {
pub target: Option<u64>,
pub unannounced: bool,
pub accumulated: u64,
pub continuations: u32,
pub last_delta: u64,
}Expand description
An output token target, kept until it is met, given up on, or cleared — a turn that ends otherwise leaves it running into the next.
Fields§
§target: Option<u64>§unannounced: boolSet by the message that set the target; the model has not been told yet.
accumulated: u64§continuations: u32§last_delta: u64Implementations§
Source§impl TokenTarget
impl TokenTarget
Sourcepub fn take_unannounced(&mut self) -> Option<u64>
pub fn take_unannounced(&mut self) -> Option<u64>
The target the model has not been told of yet, now told.
Sourcepub fn add_output(&mut self, target: u64, this_delta: u64) -> OutputProgress
pub fn add_output(&mut self, target: u64, this_delta: u64) -> OutputProgress
Count this_delta output tokens toward target.
Trait Implementations§
Auto Trait Implementations§
impl Forget for TokenTarget
impl Freeze for TokenTarget
impl Move for TokenTarget
impl RefUnwindSafe for TokenTarget
impl Send for TokenTarget
impl Sync for TokenTarget
impl Unpin for TokenTarget
impl UnsafeUnpin for TokenTarget
impl UnwindSafe for TokenTarget
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