Skip to main content

IndexKindHandler

Trait IndexKindHandler 

Source
pub trait IndexKindHandler:
    Send
    + Sync
    + Debug {
    // Required methods
    fn kinds(&self) -> &[IndexKind];
    fn validate(&self, context: &PlanContext<'_>) -> Result<(), BoxedError>;
    fn plan(
        &self,
        context: &PlanContext<'_>,
    ) -> Result<Option<Arc<dyn PlannedIndex>>, BoxedError>;
}
Expand description

Owns one or more related kinds that can share preparation and row traversal.

Required Methods§

Source

fn kinds(&self) -> &[IndexKind]

Nonempty, unique kinds exclusively owned by this handler. A group must be entirely built-in or entirely extension kinds.

Source

fn validate(&self, context: &PlanContext<'_>) -> Result<(), BoxedError>

Validates options at region creation independently of whether this lifecycle event builds indexes. Implementations must not skip validation based on context.build_type.

Source

fn plan( &self, context: &PlanContext<'_>, ) -> Result<Option<Arc<dyn PlannedIndex>>, BoxedError>

Prepares typed parameters. None means no work; an empty entry list may still request removal of obsolete descriptors during maintenance.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§