Skip to main content

ValidatingDispenser

Struct ValidatingDispenser 

Source
pub struct ValidatingDispenser { /* private fields */ }
Expand description

Op dispenser wrapper that validates results after execution.

Applied only to templates that declare verify: or relevancy: blocks. Zero overhead for templates without validation.

Implementations§

Source§

impl ValidatingDispenser

Source

pub fn wrap( inner: Arc<dyn OpDispenser>, template: &ParsedOp, labels: &Labels, program: Option<&PolydatProgram>, fx: &mut ScopeFixture, ) -> Result<(Arc<dyn OpDispenser>, Option<Arc<ValidationMetrics>>), String>

Wrap a dispenser with validation, registering the relevancy expected binding into the supplied scope fixture.

Returns the inner dispenser unchanged if neither verify: nor relevancy: are declared.

Trait Implementations§

Source§

impl OpDispenser for ValidatingDispenser

Source§

fn inner_dispenser(&self) -> Option<&dyn OpDispenser>

Expose the wrapped dispenser so describe() can walk through this layer to reach the adapter (raw / prepared / batch). Without this override, the default trait method returns None, the describe walk stops here, and the error-context dump loses the CQL statement text.

Source§

fn execute<'a>( &'a self, cycle: u64, ctx: &'a ExecCtx<'a>, ) -> Pin<Box<dyn Future<Output = Result<OpResult, ExecutionError>> + Send + 'a>>

Execute an operation for the given cycle. Read more
Source§

fn describe(&self) -> Option<String>

One-line description of the op this dispenser represents — typically the statement text / request shape with bind-point placeholders left unresolved ({table}, {key}, ?, …). Read more
Source§

fn describe_resolved(&self, wires: &dyn WireSource) -> Option<String>

Render the actual op the dispenser would fire for the given cycle — the dryrun-equivalent view of the statement after every bind point is interpolated. Read more
Source§

fn canonical_kernel(&self) -> Option<&Arc<dyn Kernel>>

SRD-68 invariant I-3 — the dispenser’s canonical Polydat Kernel, established at construction by 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 more
Source§

fn adapter_metrics(&self) -> Vec<(String, Labels, MetricValue)>

Snapshot adapter-specific metrics for inclusion in the capture snapshot. Read more
Source§

fn status_counters(&self) -> Vec<(&str, u64)>

Adapter-specific status line entries (cumulative, non-destructive read). Read more
Source§

fn rows_per_op(&self) -> usize

The op’s uniform per-invocation cursor consumption — how many consecutive wire ordinals one execute call reads and covers. Read more
Source§

impl WrappingDispenser for ValidatingDispenser

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more