pub struct DataManager<T: Clone + Configuration>(pub T, pub RedisCache, pub Pool<PostgresConnectionManager<NoTls>>);Tuple Fields§
§0: T§1: RedisCache§2: Pool<PostgresConnectionManager<NoTls>>Implementations§
Source§impl<T: Clone + Configuration> DataManager<T>
impl<T: Clone + Configuration> DataManager<T>
Sourcepub async fn connect(&self) -> Result<Connection<'_>>
pub async fn connect(&self) -> Result<Connection<'_>>
Obtain a connection to the staging database.
Sourcepub async fn new(config: T) -> Result<Self>
pub async fn new(config: T) -> Result<Self>
Create a new DataManager (and init database).
Trait Implementations§
Source§impl<T: Clone + Clone + Configuration> Clone for DataManager<T>
impl<T: Clone + Clone + Configuration> Clone for DataManager<T>
Source§fn clone(&self) -> DataManager<T>
fn clone(&self) -> DataManager<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<T> Freeze for DataManager<T>where
T: Freeze,
impl<T> !RefUnwindSafe for DataManager<T>
impl<T> Send for DataManager<T>where
T: Send,
impl<T> Sync for DataManager<T>where
T: Sync,
impl<T> Unpin for DataManager<T>where
T: Unpin,
impl<T> !UnwindSafe for DataManager<T>
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