pub struct PGRobustClientConfig<TLS> { /* private fields */ }
Implementations§
Source§impl<TLS> PGRobustClientConfig<TLS>where
TLS: MakeTlsConnect<Socket> + Clone,
<TLS as MakeTlsConnect<Socket>>::Stream: Send + Sync + 'static,
impl<TLS> PGRobustClientConfig<TLS>where
TLS: MakeTlsConnect<Socket> + Clone,
<TLS as MakeTlsConnect<Socket>>::Stream: Send + Sync + 'static,
pub fn new( database_url: impl Into<String>, make_tls: TLS, ) -> PGRobustClientConfig<TLS>
pub fn subscriptions( self, subscriptions: impl IntoIterator<Item = impl Into<String>>, ) -> Self
pub fn with_subscriptions( &mut self, subscriptions: impl IntoIterator<Item = impl Into<String>>, )
pub fn without_subscriptions( &mut self, subscriptions: impl IntoIterator<Item = impl Into<String>>, )
pub fn callback( self, callback: impl Fn(PGMessage) + Send + Sync + 'static, ) -> Self
pub fn with_callback( &mut self, callback: impl Fn(PGMessage) + Send + Sync + 'static, )
pub fn max_reconnect_attempts(self, max_reconnect_attempts: u32) -> Self
pub fn with_max_reconnect_attempts( &mut self, max_reconnect_attempts: Option<u32>, )
pub fn default_timeout(self, default_timeout: Duration) -> Self
pub fn with_default_timeout(&mut self, default_timeout: Option<Duration>)
pub fn connect_script(self, connect_script: impl Into<String>) -> Self
pub fn with_connect_script(&mut self, connect_script: Option<impl Into<String>>)
pub fn application_name(self, application_name: impl Into<String>) -> Self
pub fn with_application_name( &mut self, application_name: Option<impl Into<String>>, )
pub fn full_connect_script(&self) -> Option<String>
Trait Implementations§
Source§impl<TLS: Clone> Clone for PGRobustClientConfig<TLS>
impl<TLS: Clone> Clone for PGRobustClientConfig<TLS>
Source§fn clone(&self) -> PGRobustClientConfig<TLS>
fn clone(&self) -> PGRobustClientConfig<TLS>
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<TLS> Freeze for PGRobustClientConfig<TLS>where
TLS: Freeze,
impl<TLS> !RefUnwindSafe for PGRobustClientConfig<TLS>
impl<TLS> Send for PGRobustClientConfig<TLS>where
TLS: Send,
impl<TLS> Sync for PGRobustClientConfig<TLS>where
TLS: Sync,
impl<TLS> Unpin for PGRobustClientConfig<TLS>where
TLS: Unpin,
impl<TLS> !UnwindSafe for PGRobustClientConfig<TLS>
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