pub struct LocalPostgres { /* private fields */ }Expand description
A resolved Postgres binding. Holds connection details only — it never opens or owns a server process.
Implementations§
Source§impl LocalPostgres
impl LocalPostgres
pub fn new(params: PostgresConnectionParams) -> Self
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. Handles the Local and External (BYO)
variants. Cloud variants (Aurora / Cloud SQL / Flexible Server) carry only a reference to
the connection password in a cloud secret store; the workload SDK
(packages/sdk/src/bindings/postgres.ts) resolves it in-process with the workload’s own
identity. This Rust provider intentionally does not read cloud secrets, so it rejects cloud
bindings by design rather than half-resolving them.
Trait Implementations§
impl Binding for LocalPostgres
Source§impl Debug for LocalPostgres
impl Debug for LocalPostgres
Source§impl Postgres for LocalPostgres
impl Postgres for LocalPostgres
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 LocalPostgres
impl RefUnwindSafe for LocalPostgres
impl Send for LocalPostgres
impl Sync for LocalPostgres
impl Unpin for LocalPostgres
impl UnsafeUnpin for LocalPostgres
impl UnwindSafe for LocalPostgres
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::RequestCreates a shared type from an unshared type.