pub trait Generator {
type Shardable: Forwarder;
const MODEL_NAME: &'static str;
// Required method
fn load<'life0, 'async_trait>(
context: &'life0 mut Context,
) -> Pin<Box<dyn Future<Output = Result<Option<Box<Self>>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
A model must implement this trait in order to be usable by the Cake framework.
Required Associated Constants§
Sourceconst MODEL_NAME: &'static str
const MODEL_NAME: &'static str
The model name.
Required Associated Types§
Required Methods§
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.