[−][src]Struct transit_model::relations::ManyToMany
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]
R1: Relation<From = T>,
R2: Relation<From = R1::To, To = U>,
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]
R1: Relation<From = T>,
R2: Relation<From = U, To = R1::To>,
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]
R1: Relation<To = T>,
R2: Relation<From = R1::From, To = U>,
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, 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
fn get_from(&self) -> IdxSet<T>
[src]
fn get_to(&self) -> IdxSet<U>
[src]
fn get_corresponding_forward(&self, from: &IdxSet<T>) -> IdxSet<U>
[src]
fn get_corresponding_backward(&self, from: &IdxSet<U>) -> IdxSet<T>
[src]
impl<T: Default, U: Default> Default for ManyToMany<T, U>
[src]
fn default() -> ManyToMany<T, U>
[src]
impl<T: Debug, U: Debug> Debug for ManyToMany<T, U>
[src]
Auto Trait Implementations
impl<T, U> Send for ManyToMany<T, U> where
T: Send,
U: Send,
T: Send,
U: Send,
impl<T, U> Sync for ManyToMany<T, U> where
T: Sync,
U: Sync,
T: Sync,
U: Sync,
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,