pub struct WhileWrapper { /* private fields */ }Expand description
Wraps an inner OpDispenser with a loop driven by a GK boolean expression. See module docs.
Implementations§
Source§impl WhileWrapper
impl WhileWrapper
Sourcepub const DEFAULT_ITERATION_CEILING: u64 = 100_000_000_000
pub const DEFAULT_ITERATION_CEILING: u64 = 100_000_000_000
Default iteration ceiling. Sized to allow days-long
daemon loops at modest tick rates (e.g. 100k/sec for
11+ days) while still terminating a buggy infinite loop
in finite time during dev. Raise via
[Self::with_iteration_ceiling] if a legitimate workload
needs more.
Sourcepub fn wrap(
inner: Arc<dyn OpDispenser>,
stop_view: StopView,
fx: &mut ScopeFixture,
) -> Result<Arc<dyn OpDispenser>, String>
pub fn wrap( inner: Arc<dyn OpDispenser>, stop_view: StopView, fx: &mut ScopeFixture, ) -> Result<Arc<dyn OpDispenser>, String>
Wrap an inner dispenser. Registers the synthesised
__while binding into fx so the per-cycle read goes
through the canonical PullPlan path.
Errors if the kernel doesn’t know __while — that
means the op-kernel synthesiser didn’t inject the
binding (registry bug) or the expression failed to
compile and the kernel was rebuilt without it.
Trait Implementations§
Source§impl OpDispenser for WhileWrapper
impl OpDispenser for WhileWrapper
Source§fn execute<'a>(
&'a self,
cycle: u64,
ctx: &'a ExecCtx<'a>,
) -> Pin<Box<dyn Future<Output = Result<OpResult, ExecutionError>> + Send + 'a>>
fn execute<'a>( &'a self, cycle: u64, ctx: &'a ExecCtx<'a>, ) -> Pin<Box<dyn Future<Output = Result<OpResult, ExecutionError>> + Send + 'a>>
Source§fn inner_dispenser(&self) -> Option<&dyn OpDispenser>
fn inner_dispenser(&self) -> Option<&dyn OpDispenser>
None when this is a leaf (the adapter’s
base dispenser — e.g. CQL raw / prepared / batch,
HTTP, stdout, plotter, …). Read moreSource§fn describe(&self) -> Option<String>
fn describe(&self) -> Option<String>
{table}, {key}, ?, …). Read moreSource§fn describe_resolved(&self, wires: &dyn WireSource) -> Option<String>
fn describe_resolved(&self, wires: &dyn WireSource) -> Option<String>
Source§fn canonical_kernel(&self) -> Option<&Arc<dyn Kernel>>
fn canonical_kernel(&self) -> Option<&Arc<dyn Kernel>>
map_op from its parent — the
parent itself, or a kernel bound under it. Any engine: the
executor finds the program to bind per fiber by program_id.
Returns None for dispensers that don’t own a kernel
(adapters with no Polydat needs, or wrappers that delegate to
an inner dispenser). Read moreSource§fn adapter_metrics(&self) -> Vec<(String, Labels, MetricValue)>
fn adapter_metrics(&self) -> Vec<(String, Labels, MetricValue)>
Source§fn status_counters(&self) -> Vec<(&str, u64)>
fn status_counters(&self) -> Vec<(&str, u64)>
Source§fn rows_per_op(&self) -> usize
fn rows_per_op(&self) -> usize
execute call reads and covers. Read moreimpl WrappingDispenser for WhileWrapper
Truthy test for the predicate value. Mirrors
ConditionalDispenser::is_truthy — the two wrappers
share a semantic: 0/false/empty-string/None is falsy,
everything else is truthy.
Auto Trait Implementations§
impl !RefUnwindSafe for WhileWrapper
impl !UnwindSafe for WhileWrapper
impl Freeze for WhileWrapper
impl Send for WhileWrapper
impl Sync for WhileWrapper
impl Unpin for WhileWrapper
impl UnsafeUnpin for WhileWrapper
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
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> ⓘ
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