Skip to main content

BlobInterpreter

Trait BlobInterpreter 

Source
pub trait BlobInterpreter {
    // Required method
    fn interpret(
        &self,
        bytes: &[u8],
        ctx: &BlobContext<'_>,
    ) -> Option<Interpretation>;
}
Expand description

A consumer-supplied interpreter of opaque BLOB values. Implemented OUTSIDE this crate (a blob-decoder adapter, or the built-in Local Storage decoder) so the reader library carries no decode dependency.

Required Methods§

Source

fn interpret( &self, bytes: &[u8], ctx: &BlobContext<'_>, ) -> Option<Interpretation>

Interpret a BLOB’s bytes in the given schema context, or None when this interpreter recognises nothing in them.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§