pub struct Postgres { /* private fields */ }
Expand description
A wrapped postgres instance.
Contains a handle to a running Postgres process. Once dropped, the instance will be shut down and the temporary directory containing all of its data removed.
Implementations§
source§impl Postgres
impl Postgres
sourcepub fn build() -> PostgresBuilder
pub fn build() -> PostgresBuilder
Creates a new Postgres database builder.
sourcepub fn as_superuser(&self) -> PostgresClient<'_>
pub fn as_superuser(&self) -> PostgresClient<'_>
Returns a postgres client with superuser credentials.
sourcepub fn as_user(&self, username: &str, password: &str) -> PostgresClient<'_>
pub fn as_user(&self, username: &str, password: &str) -> PostgresClient<'_>
Returns a postgres client that uses the given credentials.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Postgres
impl RefUnwindSafe for Postgres
impl Send for Postgres
impl Sync for Postgres
impl Unpin for Postgres
impl UnwindSafe for Postgres
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