Skip to content

Commit

Permalink
Update lib/middlewares/src/metering.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Simon Warta <[email protected]>
  • Loading branch information
jubianchi and webmaster128 authored Dec 23, 2020
1 parent 8c3eb75 commit cebbe48
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/middlewares/src/metering.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@ pub struct FunctionMetering<F: Fn(&Operator) -> u64 + Copy + Clone + Send + Sync

#[derive(Debug, PartialEq)]
pub enum MeteringPoints {
/// The given number of metering points is left for the execution.
/// If the value is 0, all points are consumed and but the execution was not terminated.
Remaining(u64),
/// The execution was terminated because the metering points were exhausted.
/// You can recover from this state by setting the points via `set_remaining_points` and restart the execution.
Exhausted,
}

Expand Down

0 comments on commit cebbe48

Please sign in to comment.