Skip to main content

RawParamFilter

Trait RawParamFilter 

Source
pub trait RawParamFilter:
    Send
    + Sync
    + Debug {
    // Required method
    fn filter(
        &self,
        entity: &'static EntityMeta,
        input: &RawParams,
    ) -> Result<RawParams, ParamError>;

    // Provided methods
    fn filter_with_limits(
        &self,
        entity: &'static EntityMeta,
        input: &RawParams,
        _limits: &QueryLimits,
    ) -> Result<RawParams, ParamError> { ... }
    fn fingerprint(&self) -> u64 { ... }
}
Expand description

A server-owned parameter normalization step.

Required Methods§

Source

fn filter( &self, entity: &'static EntityMeta, input: &RawParams, ) -> Result<RawParams, ParamError>

Normalize input while preserving ordered, repeated parameters.

Provided Methods§

Source

fn filter_with_limits( &self, entity: &'static EntityMeta, input: &RawParams, _limits: &QueryLimits, ) -> Result<RawParams, ParamError>

Budget-aware entry point. Server code must perform bounded synchronous work; arbitrary extension code cannot be preempted safely by core.

Source

fn fingerprint(&self) -> u64

Stable identity used by query policy fingerprints.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§