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§
Sourcefn keys(&self) -> &'static [(&'static str, &'static str)]
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.
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".