[−][src]Struct transit_model::relations::OneToMany
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]
T: Id<T>,
U: Id<U> + Id<T>,
pub fn new(
one: &CollectionWithId<T>,
many: &CollectionWithId<U>,
rel_name: &str
) -> Result<Self>
[src]
one: &CollectionWithId<T>,
many: &CollectionWithId<U>,
rel_name: &str
) -> Result<Self>
Construct the relation automatically from the 2 given
CollectionWithId
s.
Trait Implementations
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
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, U> Default for OneToMany<T, U>
[src]
impl<T: Debug, U: Debug> Debug for OneToMany<T, U>
[src]
Auto Trait Implementations
impl<T, U> Send for OneToMany<T, U> where
T: Send,
U: Send,
T: Send,
U: Send,
impl<T, U> Sync for OneToMany<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>,