[][src]Struct transit_model_relations::OneToMany

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

A one to many relation, i.e. to one T corresponds many U, and a U has one corresponding T.

Methods

impl<T, U> OneToMany<T, U> where
    T: Id<T>,
    U: Id<U> + Id<T>, 
[src]

pub fn new(
    one: &CollectionWithId<T>,
    many: &CollectionWithId<U>,
    rel_name: &str
) -> Result<Self, Error>
[src]

Construct the relation automatically from the 2 given CollectionWithIds.

Trait Implementations

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

impl<T, U> Default for OneToMany<T, U>[src]

impl<T, U> Relation for OneToMany<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 OneToMany<T, U> where
    T: RefUnwindSafe,
    U: RefUnwindSafe

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

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

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

impl<T, U> UnwindSafe for OneToMany<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.