Struct pg_setup::PostgresDBBuilder
source · pub struct PostgresDBBuilder { /* private fields */ }Expand description
Builder to construct a PostgresDB.
Implementations§
source§impl PostgresDBBuilder
impl PostgresDBBuilder
pub fn new(db_uri: impl ToString) -> Self
sourcepub fn keep_db(self) -> Self
pub fn keep_db(self) -> Self
When set, does not drop the DB when PostgresDB goes out of scope.
sourcepub fn schema(self, schema: impl ToString) -> Self
pub fn schema(self, schema: impl ToString) -> Self
The postgres schema to use. Defaults to "public".
pub async fn start(self) -> Result<PostgresDB>
Auto Trait Implementations§
impl RefUnwindSafe for PostgresDBBuilder
impl Send for PostgresDBBuilder
impl Sync for PostgresDBBuilder
impl Unpin for PostgresDBBuilder
impl UnwindSafe for PostgresDBBuilder
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