pub struct ResolvedPostgres { /* private fields */ }Expand description
A Postgres handle whose cloud-specific work has already been completed.
Local, external, and cloud bindings differ only while resolving their connection details. They all expose the same immutable handle afterwards.
Implementations§
Source§impl ResolvedPostgres
impl ResolvedPostgres
Sourcepub fn from_binding(
binding_name: &str,
binding: &PostgresBinding,
) -> Result<Self>
pub fn from_binding( binding_name: &str, binding: &PostgresBinding, ) -> Result<Self>
Resolves connection parameters from a binding that carries its password inline: the Local (developer) and External (BYO / Kubernetes) variants.
The cloud variants carry a secret locator instead and need an async read against
that cloud’s secret store, so they have their own providers (aurora, cloud_sql,
flexible_server) that BindingsProvider::load_postgres dispatches to.
Source§impl ResolvedPostgres
impl ResolvedPostgres
pub fn new(params: PostgresConnectionParams) -> Self
Trait Implementations§
impl Binding for ResolvedPostgres
Source§impl Debug for ResolvedPostgres
impl Debug for ResolvedPostgres
Source§impl Postgres for ResolvedPostgres
impl Postgres for ResolvedPostgres
fn connection_params(&self) -> &PostgresConnectionParams
Source§fn connection_string(&self) -> String
fn connection_string(&self) -> String
postgres:// connection string, derived from connection_params and never stored.Auto Trait Implementations§
impl Freeze for ResolvedPostgres
impl RefUnwindSafe for ResolvedPostgres
impl Send for ResolvedPostgres
impl Sync for ResolvedPostgres
impl Unpin for ResolvedPostgres
impl UnsafeUnpin for ResolvedPostgres
impl UnwindSafe for ResolvedPostgres
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<K, Q> Comparable<Q> for K
impl<K, Q> Comparable<Q> for K
Source§impl<K, Q> Equivalent<Q> for K
impl<K, Q> Equivalent<Q> for K
Source§fn equivalent(&self, key: &Q) -> bool
fn equivalent(&self, key: &Q) -> bool
Compare self to
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
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 moreCreates a shared type from an unshared type.