pub struct ExtensionContext {
pub elapsed_ms: u64,
pub consumed: u64,
pub base: u64,
}Expand description
Snapshot of cursor state passed to an ExtensionPolicy
at each end-reach decision point. Policies are pure
predicates over this context — they don’t carry their own
clocks or counters.
Fields§
§elapsed_ms: u64Wall-clock milliseconds since the source factory was constructed (typically phase start).
consumed: u64Global ordinals consumed so far — cursor.load() - start.
Pass count is consumed / base.
base: u64The base chunk size declared by the cursor. Used by
policies that reason in passes rather than raw counts.
Implementations§
Trait Implementations§
Source§impl Clone for ExtensionContext
impl Clone for ExtensionContext
Source§fn clone(&self) -> ExtensionContext
fn clone(&self) -> ExtensionContext
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ExtensionContext
Auto Trait Implementations§
impl Freeze for ExtensionContext
impl RefUnwindSafe for ExtensionContext
impl Send for ExtensionContext
impl Sync for ExtensionContext
impl Unpin for ExtensionContext
impl UnsafeUnpin for ExtensionContext
impl UnwindSafe for ExtensionContext
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> 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