pub trait FactoryValue: Sized {
// Required method
fn factory_value(field: &str, seq: u64) -> Self;
// Provided method
fn factory_key(field: &str, seq: u64) -> Self { ... }
}Available on crate features
model-mysql or model-postgres or model-sqlite only.Expand description
A type with a factory default; see the module docs for the values.
Required Methods§
Sourcefn factory_value(field: &str, seq: u64) -> Self
fn factory_value(field: &str, seq: u64) -> Self
The value of field field in instance seq.
Provided Methods§
Sourcefn factory_key(field: &str, seq: u64) -> Self
fn factory_key(field: &str, seq: u64) -> Self
The value as a primary key that isn’t auto-incremented: unique per instance where the type allows it.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".