[][src]Struct transit_model_relations::ManyToMany

pub struct ManyToMany<T, U> { /* fields omitted */ }

A many to many relation, i.e. a T can have multiple U, and vice versa.

Methods

impl<T, U> ManyToMany<T, U>[src]

pub fn from_forward(forward: BTreeMap<Idx<T>, IdxSet<U>>) -> Self[src]

Constructor from the forward relation.

pub fn from_relations_chain<R1, R2>(r1: &R1, r2: &R2) -> Self where
    R1: Relation<From = T>,
    R2: Relation<From = R1::To, To = U>, 
[src]

Constructor from 2 chained relations, i.e. from the relations A->B and B->C, constructs the relation A->C.

pub fn from_relations_sink<R1, R2>(r1: &R1, r2: &R2) -> Self where
    R1: Relation<From = T>,
    R2: Relation<From = U, To = R1::To>, 
[src]

Constructor from 2 relations with a common sink, i.e. from the relations A->B and C->B, constructs the relation A->C.

pub fn from_relations_source<R1, R2>(r1: &R1, r2: &R2) -> Self where
    R1: Relation<To = T>,
    R2: Relation<From = R1::From, To = U>, 
[src]

Constructor from 2 relations with a common source, i.e. from the relations B->A and B->C, constructs the relation A->C.

Trait Implementations

impl<T: Debug, U: Debug> Debug for ManyToMany<T, U>[src]

impl<T: Default, U: Default> Default for ManyToMany<T, U>[src]

impl<T, U> Relation for ManyToMany<T, U>[src]

type From = T

The type of the source object

type To = U

The type of the targer object

Auto Trait Implementations

impl<T, U> RefUnwindSafe for ManyToMany<T, U> where
    T: RefUnwindSafe,
    U: RefUnwindSafe

impl<T, U> Send for ManyToMany<T, U> where
    T: Send,
    U: Send

impl<T, U> Sync for ManyToMany<T, U> where
    T: Sync,
    U: Sync

impl<T, U> Unpin for ManyToMany<T, U> where
    T: Unpin,
    U: Unpin

impl<T, U> UnwindSafe for ManyToMany<T, U> where
    T: RefUnwindSafe + UnwindSafe,
    U: RefUnwindSafe + UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.