Skip to main content

GenericRelatable

Trait GenericRelatable 

Source
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§

Source

fn get_content_type() -> ContentType

Returns the content type for this model.

Source

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.

Implementors§