pub struct TickController {
pub policy: TickPolicy,
pub in_flight: bool,
pub pending_ticks: usize,
pub total_processed: u64,
pub total_coalesced: u64,
pub total_dropped: u64,
}Expand description
State machine managing tick admission under load (T68).
Fields§
§policy: TickPolicy§in_flight: bool§pending_ticks: usize§total_processed: u64§total_coalesced: u64§total_dropped: u64Implementations§
Source§impl TickController
impl TickController
Sourcepub fn new(policy: TickPolicy) -> Self
pub fn new(policy: TickPolicy) -> Self
Fresh controller under policy with all counters zeroed.
Sourcepub fn request_tick(&mut self) -> bool
pub fn request_tick(&mut self) -> bool
Request a new tick. Returns true if the tick should immediately be executed.
Sourcepub fn finish_tick(&mut self) -> bool
pub fn finish_tick(&mut self) -> bool
Finish current tick processing. Returns true if a coalesced or queued tick should now execute.
Trait Implementations§
Source§impl Clone for TickController
impl Clone for TickController
Source§impl Debug for TickController
impl Debug for TickController
Source§impl Default for TickController
impl Default for TickController
impl Eq for TickController
Source§impl PartialEq for TickController
impl PartialEq for TickController
impl StructuralPartialEq for TickController
Auto Trait Implementations§
impl Freeze for TickController
impl RefUnwindSafe for TickController
impl Send for TickController
impl Sync for TickController
impl Unpin for TickController
impl UnsafeUnpin for TickController
impl UnwindSafe for TickController
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.