pub trait OpFieldModifier<T>:
Send
+ Sync
+ 'static {
// Required methods
fn field_name(&self) -> &'static str;
fn apply(&self, target: &mut T);
fn diagnostic_value(&self) -> Value;
}Expand description
A conditional per-op modifier.
Modifiers are constructed only when the user actually bound
the corresponding field in the Polydat scope — the chain pre-filters
at build time, so anything reachable through
ModifierChain::apply is by construction active. There is
no is_active() method.
The target type T is the engine’s per-statement type (e.g.
scylla::statement::Statement or
cassandra_cpp::Statement). Each engine module provides its
own impl OpFieldModifier<EngineStatement> for FooMod types
that translate a captured Rust value into the engine’s setter
call.
Required Methods§
Sourcefn field_name(&self) -> &'static str
fn field_name(&self) -> &'static str
User-facing field name. Matches the op-template key and
the adapter’s universal-field selector list. Returned as
&'static str so trace sinks can keep cheap references.
Sourcefn apply(&self, target: &mut T)
fn apply(&self, target: &mut T)
Mutate the target with the captured value. Must not look anything up — all state needed for the mutation is already captured in the modifier struct’s fields.
Sourcefn diagnostic_value(&self) -> Value
fn diagnostic_value(&self) -> Value
Structured diagnostic representation of the captured
value, used by ModifierTraceSink consumers. Called
LAZILY — only when a sink is installed AND the sink
decides to record this event.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".