pub trait Queryable {
const ENTITY_NAME: &'static str;
}Expand description
Marks a domain type as queryable, associating it with an entity name.
This trait enables ConfigMigrator to automatically determine which entity
path to use when querying or updating data.
§Example
ⓘ
impl Queryable for TaskEntity {
const ENTITY_NAME: &'static str = "task";
}
let tasks: Vec<TaskEntity> = config.query("tasks")?;Required Associated Constants§
Sourceconst ENTITY_NAME: &'static str
const ENTITY_NAME: &'static str
The entity name used to look up migration paths in the Migrator.
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.