pub trait DataObject:
DataResult<DBO = Self>
+ DataObjectInternal
+ Sync {
type PKType: PrimaryKeyType;
type Fields: Default;
const PKCOL: &'static str;
const TABLE: &'static str;
const AUTO_PK: bool;
// Required method
fn pk(&self) -> &Self::PKType;
}Expand description
An object in the database.
Rather than implementing this type manually, use the
#[model] attribute.
Required Associated Constants§
Required Associated Types§
Sourcetype PKType: PrimaryKeyType
type PKType: PrimaryKeyType
The type of the primary key field.
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.