Skip to main content

KnitAdapter

Trait KnitAdapter 

Source
pub trait KnitAdapter:
    Send
    + Sync
    + 'static {
    // Required methods
    fn keys(&self) -> &'static [(&'static str, &'static str)];
    fn get_bytes(
        &self,
        input: &KnitAdapterInput<'_>,
        target_storage_kind: &str,
        basis: Option<&dyn BasisVfBridge>,
    ) -> Result<KnitAdapterOutput, AdapterError>;
}
Expand description

A streamed record adapter — turns the bytes of one storage_kind into the bytes of another.

Adapters that don’t need a basis-vf (FT*ToUnannotated, the FT*ToFullText variants) ignore the basis argument; the two delta-to-fulltext adapters require it.

Required Methods§

Source

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

The (source_storage_kind, target_storage_kind) pair this adapter handles. The registry uses this to dispatch.

Source

fn get_bytes( &self, input: &KnitAdapterInput<'_>, target_storage_kind: &str, basis: Option<&dyn BasisVfBridge>, ) -> Result<KnitAdapterOutput, AdapterError>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§