[][src]Struct ergol::relation::OneToOne

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

A one to one relation ship.

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

Implementations

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

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

Creates a one to one relation ship.

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

Fetches the referenced element.

Trait Implementations

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

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

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

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

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

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

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

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

type Target = T

The type to which your struct will be linked.

type Reverse = Option<U>

The type to which the linked struct will be linked.

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

Auto Trait Implementations

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

impl<T> Send for OneToOne<T>

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

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

impl<T> UnwindSafe for OneToOne<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>,