pub struct PgDatabase { /* private fields */ }Implementations§
Source§impl PgDatabase
impl PgDatabase
pub async fn connect(url: &str) -> Result<Self>
pub async fn connect_with(url: &str, options: PgConnectOptions) -> Result<Self>
pub async fn connect_with_config( url: &str, config: PgDatabaseConfig, ) -> Result<Self>
pub fn with_pool(pool: PgPool) -> Self
pub fn with_pool_and_config(pool: PgPool, config: PgDatabaseConfig) -> Self
pub fn pool(&self) -> PgPool
pub fn config(&self) -> &PgDatabaseConfig
Auto Trait Implementations§
impl !RefUnwindSafe for PgDatabase
impl !UnwindSafe for PgDatabase
impl Freeze for PgDatabase
impl Send for PgDatabase
impl Sync for PgDatabase
impl Unpin for PgDatabase
impl UnsafeUnpin for PgDatabase
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> 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