pub struct DeadpoolPostgresBuilder { /* private fields */ }Expand description
Configures and connects a DeadpoolPostgresAdapter.
Prefer the DeadpoolPostgresStoresBuilder name when building
DeadpoolPostgresStores; both names refer to the same type.
Implementations§
Source§impl DeadpoolPostgresBuilder
impl DeadpoolPostgresBuilder
pub fn new() -> Self
pub fn schema(self, schema: DbSchema) -> Self
pub fn max_size(self, max_size: usize) -> Self
pub fn database_url(self, database_url: impl Into<String>) -> Self
pub fn config(self, config: Config) -> Self
Sourcepub fn build_adapter(self) -> Result<DeadpoolPostgresAdapter, RustAuthError>
pub fn build_adapter(self) -> Result<DeadpoolPostgresAdapter, RustAuthError>
Builds the adapter without validating the pool connection.
pub fn build_adapter_tls<T>(
self,
tls: T,
) -> Result<DeadpoolPostgresAdapter, RustAuthError>where
T: MakeTlsConnect<Socket> + Clone + Sync + Send + 'static,
T::Stream: Sync + Send,
T::TlsConnect: Sync + Send,
<T::TlsConnect as TlsConnect<Socket>>::Future: Send,
pub async fn connect(self) -> Result<DeadpoolPostgresAdapter, RustAuthError>
pub async fn connect_tls<T>(
self,
tls: T,
) -> Result<DeadpoolPostgresAdapter, RustAuthError>where
T: MakeTlsConnect<Socket> + Clone + Sync + Send + 'static,
T::Stream: Sync + Send,
T::TlsConnect: Sync + Send,
<T::TlsConnect as TlsConnect<Socket>>::Future: Send,
Source§impl DeadpoolPostgresBuilder
impl DeadpoolPostgresBuilder
pub async fn build_stores(self) -> Result<DeadpoolPostgresStores, RustAuthError>
pub async fn build_stores_tls<T>(
self,
tls: T,
) -> Result<DeadpoolPostgresStores, RustAuthError>where
T: MakeTlsConnect<Socket> + Clone + Sync + Send + 'static,
T::Stream: Sync + Send,
T::TlsConnect: Sync + Send,
<T::TlsConnect as TlsConnect<Socket>>::Future: Send,
Trait Implementations§
Source§impl Clone for DeadpoolPostgresBuilder
impl Clone for DeadpoolPostgresBuilder
Source§fn clone(&self) -> DeadpoolPostgresBuilder
fn clone(&self) -> DeadpoolPostgresBuilder
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DeadpoolPostgresBuilder
impl Debug for DeadpoolPostgresBuilder
Auto Trait Implementations§
impl Freeze for DeadpoolPostgresBuilder
impl RefUnwindSafe for DeadpoolPostgresBuilder
impl Send for DeadpoolPostgresBuilder
impl Sync for DeadpoolPostgresBuilder
impl Unpin for DeadpoolPostgresBuilder
impl UnsafeUnpin for DeadpoolPostgresBuilder
impl UnwindSafe for DeadpoolPostgresBuilder
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