pub trait GenericRelatable {
// Required methods
fn get_content_type() -> ContentType;
fn get_object_id(&self) -> i64;
}Available on crate feature
database and non-WebAssembly only.Expand description
Trait for models that can be targets of generic relations
Required Methods§
Sourcefn get_content_type() -> ContentType
fn get_content_type() -> ContentType
Returns the content type for this model.
Sourcefn get_object_id(&self) -> i64
fn get_object_id(&self) -> i64
Returns the object identifier for this instance.
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.