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>(
&self,
callback: impl FnMut(&'static FieldMeta, &dyn Codec),
) -> Result<(), ParamError>where
E: SearchEntity,
pub fn for_each_codec_binding<E>(
&self,
callback: impl FnMut(&'static FieldMeta, &dyn Codec),
) -> Result<(), ParamError>where
E: SearchEntity,
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>(&self, field: &FieldMeta) -> Option<&dyn Codec>where
E: SearchEntity,
Source§impl QueryPolicy
impl QueryPolicy
pub fn new( names: ParamNames, limits: QueryLimits, ) -> Result<QueryPolicy, ConfigError>
Sourcepub fn with_hard_limits(
names: ParamNames,
limits: QueryLimits,
hard_limits: QueryHardLimits,
) -> Result<QueryPolicy, ConfigError>
pub fn with_hard_limits( names: ParamNames, limits: QueryLimits, hard_limits: QueryHardLimits, ) -> Result<QueryPolicy, ConfigError>
Builds a policy with explicitly elevated hard limits.
pub fn bean_searcher_4812() -> QueryPolicy
pub fn with_cursor_codec(self, codec: CursorCodec) -> QueryPolicy
Sourcepub fn with_raw_param_filter<F>(self, filter: F) -> QueryPolicywhere
F: RawParamFilter + 'static,
pub fn with_raw_param_filter<F>(self, filter: F) -> QueryPolicywhere
F: RawParamFilter + 'static,
Appends a server-owned parameter normalization step.
Sourcepub fn with_codec<C>(self, codec: C) -> QueryPolicywhere
C: Codec + 'static,
pub fn with_codec<C>(self, codec: C) -> QueryPolicywhere
C: Codec + 'static,
Appends a named input/result codec.
Sourcepub fn with_custom_operator(
self,
operator: CustomOperator,
input_type: ValueType,
) -> Result<QueryPolicy, ConfigError>
pub fn with_custom_operator( self, operator: CustomOperator, input_type: ValueType, ) -> Result<QueryPolicy, ConfigError>
Registers one typed HTTP operator. Aliases cannot shadow builtins.
Sourcepub fn with_server_sql_extension<E>(
self,
extension: ServerSqlExtension,
) -> Result<QueryPolicy, ConfigError>where
E: SearchEntity,
pub fn with_server_sql_extension<E>(
self,
extension: ServerSqlExtension,
) -> Result<QueryPolicy, ConfigError>where
E: SearchEntity,
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>(
self,
registry: &ServerSqlRegistry,
) -> Result<QueryPolicy, ConfigError>where
E: SearchEntity,
pub fn with_server_sql_registry<E>(
self,
registry: &ServerSqlRegistry,
) -> Result<QueryPolicy, ConfigError>where
E: SearchEntity,
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<QueryPolicy, ConfigError>
pub fn with_param_names( self, names: ParamNames, ) -> Result<QueryPolicy, ConfigError>
Copies the policy for a remote endpoint with different control names.
pub fn limits(&self) -> &QueryLimits
pub fn hard_limits(&self) -> &QueryHardLimits
pub const fn fingerprint(&self) -> u64
pub const fn compatibility(&self) -> CompatibilityPolicy
pub fn cursor_codec(&self) -> Option<&CursorCodec>
Trait Implementations§
Source§impl Clone for QueryPolicy
impl Clone for QueryPolicy
Source§fn clone(&self) -> QueryPolicy
fn clone(&self) -> QueryPolicy
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for QueryPolicy
impl Debug for QueryPolicy
Source§impl Default for QueryPolicy
impl Default for QueryPolicy
Source§fn default() -> QueryPolicy
fn default() -> QueryPolicy
Auto Trait Implementations§
impl !RefUnwindSafe for QueryPolicy
impl !UnwindSafe for QueryPolicy
impl Freeze for QueryPolicy
impl Send for QueryPolicy
impl Sync for QueryPolicy
impl Unpin for QueryPolicy
impl UnsafeUnpin for QueryPolicy
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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