[][src]Trait diesel::associations::BelongsTo

pub trait BelongsTo<Parent> {
    type ForeignKey: Hash + Eq;
    type ForeignKeyColumn: Column;
    fn foreign_key(&self) -> Option<&Self::ForeignKey>;
fn foreign_key_column() -> Self::ForeignKeyColumn; }

Indicates that a type belongs to Parent

Specifically, this means that this struct has fields which correspond to the primary key of Parent. This implies that a foreign key relationship exists on the tables.

This trait is not capable of supporting composite foreign keys

Associated Types

type ForeignKey: Hash + Eq

The foreign key of this struct

type ForeignKeyColumn: Column

The database column representing the foreign key of the table this struct represents

Loading content...

Required methods

fn foreign_key(&self) -> Option<&Self::ForeignKey>

Returns the foreign key for self

fn foreign_key_column() -> Self::ForeignKeyColumn

Returns the foreign key column of this struct's table

Loading content...

Implementations on Foreign Types

impl<A, Parent> BelongsTo<Parent> for (A,) where
    A: BelongsTo<Parent>, 
[src]

type ForeignKey = A::ForeignKey

type ForeignKeyColumn = A::ForeignKeyColumn

impl<A, B, Parent> BelongsTo<Parent> for (A, B) where
    A: BelongsTo<Parent>, 
[src]

type ForeignKey = A::ForeignKey

type ForeignKeyColumn = A::ForeignKeyColumn

impl<A, B, C, Parent> BelongsTo<Parent> for (A, B, C) where
    A: BelongsTo<Parent>, 
[src]

type ForeignKey = A::ForeignKey

type ForeignKeyColumn = A::ForeignKeyColumn

impl<A, B, C, D, Parent> BelongsTo<Parent> for (A, B, C, D) where
    A: BelongsTo<Parent>, 
[src]

type ForeignKey = A::ForeignKey

type ForeignKeyColumn = A::ForeignKeyColumn

impl<A, B, C, D, E, Parent> BelongsTo<Parent> for (A, B, C, D, E) where
    A: BelongsTo<Parent>, 
[src]

type ForeignKey = A::ForeignKey

type ForeignKeyColumn = A::ForeignKeyColumn

impl<A, B, C, D, E, F, Parent> BelongsTo<Parent> for (A, B, C, D, E, F) where
    A: BelongsTo<Parent>, 
[src]

type ForeignKey = A::ForeignKey

type ForeignKeyColumn = A::ForeignKeyColumn

impl<A, B, C, D, E, F, G, Parent> BelongsTo<Parent> for (A, B, C, D, E, F, G) where
    A: BelongsTo<Parent>, 
[src]

type ForeignKey = A::ForeignKey

type ForeignKeyColumn = A::ForeignKeyColumn

impl<A, B, C, D, E, F, G, H, Parent> BelongsTo<Parent> for (A, B, C, D, E, F, G, H) where
    A: BelongsTo<Parent>, 
[src]

type ForeignKey = A::ForeignKey

type ForeignKeyColumn = A::ForeignKeyColumn

impl<A, B, C, D, E, F, G, H, I, Parent> BelongsTo<Parent> for (A, B, C, D, E, F, G, H, I) where
    A: BelongsTo<Parent>, 
[src]

type ForeignKey = A::ForeignKey

type ForeignKeyColumn = A::ForeignKeyColumn

impl<A, B, C, D, E, F, G, H, I, J, Parent> BelongsTo<Parent> for (A, B, C, D, E, F, G, H, I, J) where
    A: BelongsTo<Parent>, 
[src]

type ForeignKey = A::ForeignKey

type ForeignKeyColumn = A::ForeignKeyColumn

impl<A, B, C, D, E, F, G, H, I, J, K, Parent> BelongsTo<Parent> for (A, B, C, D, E, F, G, H, I, J, K) where
    A: BelongsTo<Parent>, 
[src]

type ForeignKey = A::ForeignKey

type ForeignKeyColumn = A::ForeignKeyColumn

impl<A, B, C, D, E, F, G, H, I, J, K, L, Parent> BelongsTo<Parent> for (A, B, C, D, E, F, G, H, I, J, K, L) where
    A: BelongsTo<Parent>, 
[src]

type ForeignKey = A::ForeignKey

type ForeignKeyColumn = A::ForeignKeyColumn

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, Parent> BelongsTo<Parent> for (A, B, C, D, E, F, G, H, I, J, K, L, M) where
    A: BelongsTo<Parent>, 
[src]

type ForeignKey = A::ForeignKey

type ForeignKeyColumn = A::ForeignKeyColumn

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, Parent> BelongsTo<Parent> for (A, B, C, D, E, F, G, H, I, J, K, L, M, N) where
    A: BelongsTo<Parent>, 
[src]

type ForeignKey = A::ForeignKey

type ForeignKeyColumn = A::ForeignKeyColumn

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, Parent> BelongsTo<Parent> for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O) where
    A: BelongsTo<Parent>, 
[src]

type ForeignKey = A::ForeignKey

type ForeignKeyColumn = A::ForeignKeyColumn

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Parent> BelongsTo<Parent> for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P) where
    A: BelongsTo<Parent>, 
[src]

type ForeignKey = A::ForeignKey

type ForeignKeyColumn = A::ForeignKeyColumn

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, Parent> BelongsTo<Parent> for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q) where
    A: BelongsTo<Parent>, 
[src]

type ForeignKey = A::ForeignKey

type ForeignKeyColumn = A::ForeignKeyColumn

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, Parent> BelongsTo<Parent> for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R) where
    A: BelongsTo<Parent>, 
[src]

type ForeignKey = A::ForeignKey

type ForeignKeyColumn = A::ForeignKeyColumn

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, Parent> BelongsTo<Parent> for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S) where
    A: BelongsTo<Parent>, 
[src]

type ForeignKey = A::ForeignKey

type ForeignKeyColumn = A::ForeignKeyColumn

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, Parent> BelongsTo<Parent> for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T) where
    A: BelongsTo<Parent>, 
[src]

type ForeignKey = A::ForeignKey

type ForeignKeyColumn = A::ForeignKeyColumn

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, Parent> BelongsTo<Parent> for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U) where
    A: BelongsTo<Parent>, 
[src]

type ForeignKey = A::ForeignKey

type ForeignKeyColumn = A::ForeignKeyColumn

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, Parent> BelongsTo<Parent> for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V) where
    A: BelongsTo<Parent>, 
[src]

type ForeignKey = A::ForeignKey

type ForeignKeyColumn = A::ForeignKeyColumn

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, Parent> BelongsTo<Parent> for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W) where
    A: BelongsTo<Parent>, 
[src]

type ForeignKey = A::ForeignKey

type ForeignKeyColumn = A::ForeignKeyColumn

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Parent> BelongsTo<Parent> for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X) where
    A: BelongsTo<Parent>, 
[src]

type ForeignKey = A::ForeignKey

type ForeignKeyColumn = A::ForeignKeyColumn

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Parent> BelongsTo<Parent> for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y) where
    A: BelongsTo<Parent>, 
[src]

type ForeignKey = A::ForeignKey

type ForeignKeyColumn = A::ForeignKeyColumn

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, Parent> BelongsTo<Parent> for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z) where
    A: BelongsTo<Parent>, 
[src]

type ForeignKey = A::ForeignKey

type ForeignKeyColumn = A::ForeignKeyColumn

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, AA, Parent> BelongsTo<Parent> for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, AA) where
    A: BelongsTo<Parent>, 
[src]

type ForeignKey = A::ForeignKey

type ForeignKeyColumn = A::ForeignKeyColumn

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, AA, AB, Parent> BelongsTo<Parent> for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, AA, AB) where
    A: BelongsTo<Parent>, 
[src]

type ForeignKey = A::ForeignKey

type ForeignKeyColumn = A::ForeignKeyColumn

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, AA, AB, AC, Parent> BelongsTo<Parent> for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, AA, AB, AC) where
    A: BelongsTo<Parent>, 
[src]

type ForeignKey = A::ForeignKey

type ForeignKeyColumn = A::ForeignKeyColumn

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, AA, AB, AC, AD, Parent> BelongsTo<Parent> for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, AA, AB, AC, AD) where
    A: BelongsTo<Parent>, 
[src]

type ForeignKey = A::ForeignKey

type ForeignKeyColumn = A::ForeignKeyColumn

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, AA, AB, AC, AD, AE, Parent> BelongsTo<Parent> for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, AA, AB, AC, AD, AE) where
    A: BelongsTo<Parent>, 
[src]

type ForeignKey = A::ForeignKey

type ForeignKeyColumn = A::ForeignKeyColumn

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, AA, AB, AC, AD, AE, AF, Parent> BelongsTo<Parent> for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, AA, AB, AC, AD, AE, AF) where
    A: BelongsTo<Parent>, 
[src]

type ForeignKey = A::ForeignKey

type ForeignKeyColumn = A::ForeignKeyColumn

Loading content...

Implementors

Loading content...