pub struct EntraAuthOptions { /* private fields */ }Expand description
Configuration for connecting to Azure Database for PostgreSQL using Microsoft Entra ID authentication.
Construct with EntraAuthOptions::new (sensible Azure-public-cloud
defaults) and customize via the chainable mutators below.
§Example
use duroxide_pg::entra::EntraAuthOptions;
use std::time::Duration;
let opts = EntraAuthOptions::new()
.max_connections(20)
.acquire_timeout(Duration::from_secs(45));Implementations§
Source§impl EntraAuthOptions
impl EntraAuthOptions
Sourcepub fn audience(self, audience: impl Into<String>) -> Self
pub fn audience(self, audience: impl Into<String>) -> Self
Override the token audience/scope. Required for sovereign clouds
(e.g., Azure US Government uses
https://ossrdbms-aad.database.usgovcloudapi.net/.default).
Sourcepub fn max_connections(self, max: u32) -> Self
pub fn max_connections(self, max: u32) -> Self
Override the pool’s maximum connection count.
A value of 0 is silently clamped to 1 because the pool’s
hardcoded min_connections(1) would otherwise reject the
configuration at runtime (SF-G).
Sourcepub fn acquire_timeout(self, timeout: Duration) -> Self
pub fn acquire_timeout(self, timeout: Duration) -> Self
Override the pool’s connection acquisition timeout.
Sourcepub fn refresh_interval(self, interval: Duration) -> Self
pub fn refresh_interval(self, interval: Duration) -> Self
Override the upper bound on time between refresh attempts. The
background refresh task may refresh sooner than this interval if a
token’s expires_at is approaching.
Trait Implementations§
Source§impl Clone for EntraAuthOptions
impl Clone for EntraAuthOptions
Source§fn clone(&self) -> EntraAuthOptions
fn clone(&self) -> EntraAuthOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EntraAuthOptions
impl Debug for EntraAuthOptions
Auto Trait Implementations§
impl Freeze for EntraAuthOptions
impl RefUnwindSafe for EntraAuthOptions
impl Send for EntraAuthOptions
impl Sync for EntraAuthOptions
impl Unpin for EntraAuthOptions
impl UnsafeUnpin for EntraAuthOptions
impl UnwindSafe for EntraAuthOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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