pub struct PgMetadataAdapter {
pub connection_info: String,
pub connection_description: String,
/* private fields */
}Expand description
Factory for direct PostgreSQL metadata connections.
Fields§
§connection_info: String§connection_description: StringImplementations§
Source§impl PgMetadataAdapter
impl PgMetadataAdapter
Sourcepub fn new(connection_info: impl Into<String>) -> Self
pub fn new(connection_info: impl Into<String>) -> Self
Creates an adapter from an existing libpq-style connection string.
Sourcepub fn direct(config: DirectPostgresConnectConfig) -> Self
pub fn direct(config: DirectPostgresConnectConfig) -> Self
Creates an adapter from structured direct connection settings.
Sourcepub fn direct_with_ca(
config: DirectPostgresConnectConfig,
root_certificates: Vec<String>,
) -> Self
pub fn direct_with_ca( config: DirectPostgresConnectConfig, root_certificates: Vec<String>, ) -> Self
Creates a direct adapter with an explicit additional CA bundle.
Sourcepub fn direct_with_ca_and_routing_address(
config: DirectPostgresConnectConfig,
routing_address: Option<&str>,
root_certificates: Vec<String>,
) -> Self
pub fn direct_with_ca_and_routing_address( config: DirectPostgresConnectConfig, routing_address: Option<&str>, root_certificates: Vec<String>, ) -> Self
Creates a direct adapter that routes transport separately while TLS continues to verify the configured logical host.
Sourcepub fn connection_description(&self) -> &str
pub fn connection_description(&self) -> &str
Returns the connection description safe for logs and diagnostics.
Sourcepub fn connect_observed(
&self,
context: Option<&CorrelationContext>,
) -> Result<PgMetadataConnection, PgMetaError>
pub fn connect_observed( &self, context: Option<&CorrelationContext>, ) -> Result<PgMetadataConnection, PgMetaError>
Opens a correlated read capability. Emits one connection event and one query-stage summary when the operation-scoped connection is released.
Sourcepub fn connect(&self) -> Result<PgMetadataConnection, PgMetaError>
pub fn connect(&self) -> Result<PgMetadataConnection, PgMetaError>
Opens a direct PostgreSQL metadata connection.
§Errors
Returns an error if TLS configuration cannot be built or PostgreSQL rejects the connection.
Trait Implementations§
Source§impl Clone for PgMetadataAdapter
impl Clone for PgMetadataAdapter
Source§fn clone(&self) -> PgMetadataAdapter
fn clone(&self) -> PgMetadataAdapter
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PgMetadataAdapter
impl RefUnwindSafe for PgMetadataAdapter
impl Send for PgMetadataAdapter
impl Sync for PgMetadataAdapter
impl Unpin for PgMetadataAdapter
impl UnsafeUnpin for PgMetadataAdapter
impl UnwindSafe for PgMetadataAdapter
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