pub struct SpecimenRepository { /* private fields */ }Implementations§
Source§impl SpecimenRepository
impl SpecimenRepository
pub fn new(db: Arc<RwLock<dyn DatabaseInterface>>) -> Self
Trait Implementations§
Source§impl Repository<Specimen> for SpecimenRepository
impl Repository<Specimen> for SpecimenRepository
fn get_db(&self) -> Arc<RwLock<dyn DatabaseInterface>>
fn create( &self, new_entity: NewSpecimen, ) -> Result<Specimen, GameRepositoryError>
fn find(&self, id: i64) -> Result<Option<Specimen>, GameRepositoryError>
fn save(&self, entity: Specimen) -> Result<Specimen, GameRepositoryError>
fn delete(&self, entity: Specimen) -> Result<bool, GameRepositoryError>
fn get_connection( &self, ) -> Result<PooledConnection<ConnectionManager<PgConnection>>, GameDatabaseError>
Source§impl SpecimenRepositoryInterface for SpecimenRepository
impl SpecimenRepositoryInterface for SpecimenRepository
fn find_by_user( &self, owner_user: &User, ) -> Result<Vec<Specimen>, GameRepositoryError>
Auto Trait Implementations§
impl Freeze for SpecimenRepository
impl RefUnwindSafe for SpecimenRepository
impl Send for SpecimenRepository
impl Sync for SpecimenRepository
impl Unpin for SpecimenRepository
impl UnwindSafe for SpecimenRepository
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