Skip to main content

SearchEntity

Trait SearchEntity 

Source
pub trait SearchEntity:
    Sized
    + Send
    + Sync
    + 'static {
    const META: &'static EntityMeta;

    // Provided methods
    fn condition_order(_field: FieldId) -> Option<ConditionOrder> { ... }
    fn custom_operator_names(_field: FieldId) -> &'static [&'static str] { ... }
    fn codec_name(_field: FieldId) -> Option<&'static str> { ... }
    fn label_bindings() -> &'static [(&'static str, &'static str)] { ... }
    fn cursor_key_non_null(_field: FieldId) -> bool { ... }
    fn cursor_value(&self, _field: FieldId) -> Option<CursorValue> { ... }
}
Expand description

Implemented by derive-generated query entities.

Required Associated Constants§

Source

const META: &'static EntityMeta

Provided Methods§

Source

fn condition_order(_field: FieldId) -> Option<ConditionOrder>

Server-declared ordering expression using one validated query condition.

Source

fn custom_operator_names(_field: FieldId) -> &'static [&'static str]

HTTP-only custom operator whitelist; trusted programmatic operators are independent of this registration boundary.

Source

fn codec_name(_field: FieldId) -> Option<&'static str>

Optional named codec binding generated by #[search_field(codec = "name")].

Source

fn label_bindings() -> &'static [(&'static str, &'static str)]

Declarative (source field, dictionary key) label bindings generated from #[search_field(label = "...")].

Source

fn cursor_key_non_null(_field: FieldId) -> bool

Server assertion that the ordering expression is never SQL NULL. Defaults to false; Rust types alone do not establish SQL nullability.

Source

fn cursor_value(&self, _field: FieldId) -> Option<CursorValue>

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§