pub struct PostgresDB { /* private fields */ }Expand description
See module comment.
Implementations§
Source§impl PostgresDB
impl PostgresDB
pub async fn con(&mut self) -> Result<PgConnection>
pub async fn pool(&self) -> Result<Pool<Postgres>>
pub async fn delete_all_tables(&self) -> Result<()>
pub async fn execute(&self, sql: &str) -> Result<()>
pub async fn create_table<F>(
&self,
table_name: impl AsRef<str>,
tbl_callback: F,
) -> Result<()>where
F: Fn(&mut TableBuilder),
pub async fn setup(&self) -> Result<()>
Trait Implementations§
Source§impl Drop for PostgresDB
impl Drop for PostgresDB
Auto Trait Implementations§
impl !RefUnwindSafe for PostgresDB
impl !Send for PostgresDB
impl !Sync for PostgresDB
impl !UnwindSafe for PostgresDB
impl Freeze for PostgresDB
impl Unpin for PostgresDB
impl UnsafeUnpin for PostgresDB
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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