Skip to main content

ForeignKeyValue

Trait ForeignKeyValue 

Source
pub trait ForeignKeyValue<Key: PrimaryKey>:
    Copy
    + Send
    + 'static {
    const OPTIONAL: bool;

    // Required method
    fn owner_key(self) -> Option<Key>;
}
Expand description

Extracts the owner key from a required or nullable foreign-key field.

Required Associated Constants§

Required Methods§

Source

fn owner_key(self) -> Option<Key>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<Key: PrimaryKey> ForeignKeyValue<Key> for Option<Key>

Source§

const OPTIONAL: bool = true

Source§

fn owner_key(self) -> Option<Key>

Implementors§

Source§

impl<Key: PrimaryKey> ForeignKeyValue<Key> for Key

Source§

const OPTIONAL: bool = false