[][src]Struct ergol::relation::ManyToOne

pub struct ManyToOne<T: ToTable> { /* fields omitted */ }

A many to one relation ship.

You should not use this type by yourself, it should be automatically generated by the #[many_to_one] macro attribute.

Implementations

impl<T: ToTable> ManyToOne<T>[src]

pub fn new(id: i32) -> ManyToOne<T>[src]

Creates a new many to one relationship.

pub async fn fetch<'_, '_>(&'_ self, client: &'_ Client) -> Result<T, Error>[src]

Fetches the element referenced by this relationship.

Trait Implementations

impl<T: Clone + ToTable> Clone for ManyToOne<T>[src]

impl<T: Copy + ToTable> Copy for ManyToOne<T>[src]

impl<T: Debug + ToTable> Debug for ManyToOne<T>[src]

impl<T: ToTable, '_> From<&'_ T> for ManyToOne<T>[src]

impl<T: ToTable> From<T> for ManyToOne<T>[src]

impl<'a, T: ToTable> FromSql<'a> for ManyToOne<T>[src]

impl<T: ToTable> Pg for ManyToOne<T>[src]

impl<T: ToTable, U: ToTable> Relation<U> for ManyToOne<T>[src]

type Target = T

The type to which your struct will be linked.

type Reverse = Vec<U>

The type to which the linked struct will be linked.

impl<T: ToTable> ToSql for ManyToOne<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for ManyToOne<T> where
    T: RefUnwindSafe

impl<T> Send for ManyToOne<T>

impl<T> Sync for ManyToOne<T> where
    T: Sync

impl<T> Unpin for ManyToOne<T> where
    T: Unpin

impl<T> UnwindSafe for ManyToOne<T> where
    T: 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<!> for T[src]

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

impl<T> FromSqlOwned for T where
    T: for<'a> FromSql<'a>, 
[src]

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

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,