pub struct HasManyRef<'a, Owner, Related> { /* private fields */ }Expand description
Связь «имеет много». User has many Posts через user_id.
Implementations§
Source§impl<'a, Owner, Related> HasManyRef<'a, Owner, Related>
impl<'a, Owner, Related> HasManyRef<'a, Owner, Related>
pub fn new(owner_id: i64, fk_col: &'static str) -> Self
pub fn filter<F>(self, f: F) -> Self
pub fn order_by<F>(self, _f: F) -> Self
pub async fn load(self, pool: &PgPool) -> OrmResult<Vec<Related>>
pub async fn count(self, pool: &PgPool) -> OrmResult<i64>
pub async fn create<N: Serialize>( self, _new_record: N, _pool: &PgPool, ) -> OrmResult<Related>
Auto Trait Implementations§
impl<'a, Owner, Related> Freeze for HasManyRef<'a, Owner, Related>
impl<'a, Owner, Related> RefUnwindSafe for HasManyRef<'a, Owner, Related>where
Related: RefUnwindSafe,
Owner: RefUnwindSafe,
impl<'a, Owner, Related> Send for HasManyRef<'a, Owner, Related>
impl<'a, Owner, Related> Sync for HasManyRef<'a, Owner, Related>
impl<'a, Owner, Related> Unpin for HasManyRef<'a, Owner, Related>where
Related: Unpin,
impl<'a, Owner, Related> UnsafeUnpin for HasManyRef<'a, Owner, Related>
impl<'a, Owner, Related> UnwindSafe for HasManyRef<'a, Owner, Related>where
Related: UnwindSafe,
Owner: RefUnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more