pub trait UnsizedCacheKey {
type ValueType: 'static + ?Sized;
// Required methods
fn key(&self) -> Cow<'_, str>;
fn type_name() -> &'static str;
// Provided methods
fn stable_type_id() -> &'static str { ... }
fn schema() -> CacheKeySchema { ... }
fn write_key(&self, builder: &mut KeyBuilder) { ... }
}Expand description
Required Associated Types§
Required Methods§
fn key(&self) -> Cow<'_, str>
Sourcefn type_name() -> &'static str
fn type_name() -> &'static str
Short, stable string identifying this value type.
See CacheKey::type_name for requirements.
Provided Methods§
Sourcefn stable_type_id() -> &'static str
fn stable_type_id() -> &'static str
Stable identity included in the physical key.
Sourcefn schema() -> CacheKeySchema
fn schema() -> CacheKeySchema
Versioned schema for the logical key fields.
Sourcefn write_key(&self, builder: &mut KeyBuilder)
fn write_key(&self, builder: &mut KeyBuilder)
Stream the logical key fields into the canonical key builder.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".