pub struct ReadBudget { /* private fields */ }Expand description
What read_budget began; the budget is off once this is ended or dropped.
Implementations§
Source§impl ReadBudget
impl ReadBudget
Sourcepub fn end(self) -> ReadBudgetEnd
pub fn end(self) -> ReadBudgetEnd
The run is over: how many tokens it read, and whether it read all it may. A run the budget ended counts as read
what it read, as a run that finished does: the failed reads, and an inner reading_from_mouth’s reset of the
count on the way out, leave no mark on progress. A run that ended otherwise keeps the count
as it found it. (A failed run’s reset is that path’s own.)
Trait Implementations§
Source§impl Drop for ReadBudget
impl Drop for ReadBudget
Auto Trait Implementations§
impl Freeze for ReadBudget
impl RefUnwindSafe for ReadBudget
impl Send for ReadBudget
impl Sync for ReadBudget
impl Unpin for ReadBudget
impl UnsafeUnpin for ReadBudget
impl UnwindSafe for ReadBudget
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