pub struct ConnectionCache<R, S, T> { /* private fields */ }
Implementations§
source§impl<P, M, C> ConnectionCache<P, M, C>where
P: ConnectionPool<NewConnectionConfig = C>,
M: ConnectionManager<ConnectionPool = P, NewConnectionConfig = C>,
C: NewConnectionConfig,
impl<P, M, C> ConnectionCache<P, M, C>where
P: ConnectionPool<NewConnectionConfig = C>,
M: ConnectionManager<ConnectionPool = P, NewConnectionConfig = C>,
C: NewConnectionConfig,
pub fn new( name: &'static str, connection_manager: M, connection_pool_size: usize, ) -> Result<Self, ClientError>
pub fn new_with_config( name: &'static str, connection_pool_size: usize, connection_config: C, connection_manager: M, ) -> Self
pub fn update_key(&self, key: &Keypair) -> Result<(), Box<dyn Error>>
pub fn get_connection( &self, addr: &SocketAddr, ) -> Arc<<<P as ConnectionPool>::BaseClientConnection as BaseClientConnection>::BlockingClientConnection>
pub fn get_nonblocking_connection( &self, addr: &SocketAddr, ) -> Arc<<<P as ConnectionPool>::BaseClientConnection as BaseClientConnection>::NonblockingClientConnection>
Auto Trait Implementations§
impl<R, S, T> !Freeze for ConnectionCache<R, S, T>
impl<R, S, T> RefUnwindSafe for ConnectionCache<R, S, T>where
S: RefUnwindSafe,
T: RefUnwindSafe,
impl<R, S, T> Send for ConnectionCache<R, S, T>
impl<R, S, T> Sync for ConnectionCache<R, S, T>
impl<R, S, T> Unpin for ConnectionCache<R, S, T>
impl<R, S, T> UnwindSafe for ConnectionCache<R, S, T>where
S: RefUnwindSafe,
T: RefUnwindSafe,
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
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 more