pub struct PondRepository { /* private fields */ }Implementations§
Source§impl PondRepository
impl PondRepository
pub fn new(db: Arc<RwLock<dyn DatabaseInterface>>) -> Self
Trait Implementations§
Source§impl PondRepositoryInterface for PondRepository
impl PondRepositoryInterface for PondRepository
fn find_by_user( &self, owner_user: &User, ) -> Result<Vec<Pond>, GameRepositoryError>
Source§impl Repository<Pond> for PondRepository
impl Repository<Pond> for PondRepository
fn get_db(&self) -> Arc<RwLock<dyn DatabaseInterface>>
fn create(&self, new_entity: NewPond) -> Result<Pond, GameRepositoryError>
fn find(&self, id: i64) -> Result<Option<Pond>, GameRepositoryError>
fn save(&self, entity: Pond) -> Result<Pond, GameRepositoryError>
fn delete(&self, entity: Pond) -> Result<bool, GameRepositoryError>
fn get_connection( &self, ) -> Result<PooledConnection<ConnectionManager<PgConnection>>, GameDatabaseError>
Auto Trait Implementations§
impl Freeze for PondRepository
impl RefUnwindSafe for PondRepository
impl Send for PondRepository
impl Sync for PondRepository
impl Unpin for PondRepository
impl UnwindSafe for PondRepository
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> IntoSql for T
impl<T> IntoSql for T
Source§fn into_sql<T>(self) -> Self::Expression
fn into_sql<T>(self) -> Self::Expression
Convert
self to an expression for Diesel’s query builder. Read moreSource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
Convert
&self to an expression for Diesel’s query builder. Read more