pub trait Link: Entity {
// Required methods
fn source_id(&self) -> Uuid;
fn target_id(&self) -> Uuid;
fn link_type(&self) -> &str;
// Provided method
fn display(&self) { ... }
}Expand description
Trait for link entities that represent relationships between entities.
Links extend the base Entity with:
- source_id: The ID of the source entity
- target_id: The ID of the target entity
- link_type: The type of relationship
Required Methods§
Provided 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.