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§
Sourcefn kinds(&self) -> &[IndexKind]
fn kinds(&self) -> &[IndexKind]
Nonempty, unique kinds exclusively owned by this handler. A group must be entirely built-in or entirely extension kinds.
Sourcefn validate(&self, context: &PlanContext<'_>) -> Result<(), BoxedError>
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.
Sourcefn plan(
&self,
context: &PlanContext<'_>,
) -> Result<Option<Arc<dyn PlannedIndex>>, BoxedError>
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".