pub trait BlobEncoding:
MetaDescribe
+ Sized
+ 'static {
// Provided methods
fn blob_from<T: IntoBlob<Self>>(t: T) -> Blob<Self> { ... }
fn to_encoded(blob: Blob<Self>) -> Encoded<Handle<Self>>
where Handle<Self>: InlineEncoding { ... }
}Expand description
A trait for defining the abstract schema type of a blob.
This is similar to the InlineEncoding trait in the value module.
Provided Methods§
Sourcefn blob_from<T: IntoBlob<Self>>(t: T) -> Blob<Self>
fn blob_from<T: IntoBlob<Self>>(t: T) -> Blob<Self>
Converts a concrete Rust type to a blob with this schema via IntoBlob.
Sourcefn to_encoded(blob: Blob<Self>) -> Encoded<Handle<Self>>where
Handle<Self>: InlineEncoding,
fn to_encoded(blob: Blob<Self>) -> Encoded<Handle<Self>>where
Handle<Self>: InlineEncoding,
Lift a Blob<Self> into the Encoded
sum entity!{} consumes — yields
Encoded::Blob(blob.transmute()). The handle lives inside the
blob; consumers recover it via
Encoded::inline.
Overridable if a schema has unusual storage semantics. The
inline-path counterpart lives on
InlineEncoding::to_encoded.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.