pub struct QueryPolicy { /* private fields */ }Expand description
Immutable parser and execution policy.
Implementations§
Source§impl QueryPolicy
impl QueryPolicy
Sourcepub fn for_each_codec_binding<E: SearchEntity>(
&self,
callback: impl FnMut(&'static FieldMeta, &dyn Codec),
) -> Result<(), ParamError>
pub fn for_each_codec_binding<E: SearchEntity>( &self, callback: impl FnMut(&'static FieldMeta, &dyn Codec), ) -> Result<(), ParamError>
Iterates the codecs that are actually bound to an entity’s result fields. The binding list is validated and cached per policy/entity.
pub fn codec_for<E: SearchEntity>( &self, field: &FieldMeta, ) -> Option<&dyn Codec>
Source§impl QueryPolicy
impl QueryPolicy
pub fn new(names: ParamNames, limits: QueryLimits) -> Result<Self, ConfigError>
Sourcepub fn with_hard_limits(
names: ParamNames,
limits: QueryLimits,
hard_limits: QueryHardLimits,
) -> Result<Self, ConfigError>
pub fn with_hard_limits( names: ParamNames, limits: QueryLimits, hard_limits: QueryHardLimits, ) -> Result<Self, ConfigError>
Builds a policy with explicitly elevated hard limits.
pub fn bean_searcher_4812() -> Self
pub fn with_cursor_codec(self, codec: CursorCodec) -> Self
Sourcepub fn with_raw_param_filter<F: RawParamFilter + 'static>(
self,
filter: F,
) -> Self
pub fn with_raw_param_filter<F: RawParamFilter + 'static>( self, filter: F, ) -> Self
Appends a server-owned parameter normalization step.
Sourcepub fn with_codec<C: Codec + 'static>(self, codec: C) -> Self
pub fn with_codec<C: Codec + 'static>(self, codec: C) -> Self
Appends a named input/result codec.
Sourcepub fn with_custom_operator(
self,
operator: CustomOperator,
input_type: ValueType,
) -> Result<Self, ConfigError>
pub fn with_custom_operator( self, operator: CustomOperator, input_type: ValueType, ) -> Result<Self, ConfigError>
Registers one typed HTTP operator. Aliases cannot shadow builtins.
Sourcepub fn with_server_sql_extension<E: SearchEntity>(
self,
extension: ServerSqlExtension,
) -> Result<Self, ConfigError>
pub fn with_server_sql_extension<E: SearchEntity>( self, extension: ServerSqlExtension, ) -> Result<Self, ConfigError>
Registers a server-owned SQL extension and verifies its generated field whitelist against an entity before it can be exposed to HTTP.
Sourcepub fn with_server_sql_registry<E: SearchEntity>(
self,
registry: &ServerSqlRegistry,
) -> Result<Self, ConfigError>
pub fn with_server_sql_registry<E: SearchEntity>( self, registry: &ServerSqlRegistry, ) -> Result<Self, ConfigError>
Registers every bounded, server-owned SQL extension in a registry for one entity. The registry itself contains no request data and is expected to be constructed during application startup.
pub fn registered_operator(&self, name: &str) -> Option<&RegisteredOperator>
pub fn names(&self) -> &ParamNames
Sourcepub fn with_param_names(self, names: ParamNames) -> Result<Self, ConfigError>
pub fn with_param_names(self, names: ParamNames) -> Result<Self, ConfigError>
Copies the policy for a remote endpoint with different control names.