pub struct ConnectionManager { /* private fields */ }
Expand description
A bb8::ManageConnection
for memcache_async::ascii::Protocol
.
Implementations§
Source§impl ConnectionManager
impl ConnectionManager
Sourcepub fn new(url: Url, resolver: TokioAsyncResolver) -> ConnectionManager
pub fn new(url: Url, resolver: TokioAsyncResolver) -> ConnectionManager
Initialize ConnectionManager with given URL
Trait Implementations§
Source§impl Clone for ConnectionManager
impl Clone for ConnectionManager
Source§fn clone(&self) -> ConnectionManager
fn clone(&self) -> ConnectionManager
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 moreSource§impl Debug for ConnectionManager
impl Debug for ConnectionManager
Source§impl ManageConnection for ConnectionManager
impl ManageConnection for ConnectionManager
Source§type Connection = Connection
type Connection = Connection
The connection type this manager deals with.
Source§type Error = MemcacheError
type Error = MemcacheError
The error type returned by
Connection
s.Source§fn connect<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Self::Connection, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn connect<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Self::Connection, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Attempts to create a new connection.
Source§fn is_valid<'life0, 'life1, 'async_trait>(
&'life0 self,
conn: &'life1 mut Self::Connection,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn is_valid<'life0, 'life1, 'async_trait>(
&'life0 self,
conn: &'life1 mut Self::Connection,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Determines if the connection is still connected to the database.
Source§fn has_broken(&self, conn: &mut Self::Connection) -> bool
fn has_broken(&self, conn: &mut Self::Connection) -> bool
Synchronously determine if the connection is no longer usable, if possible.
Source§impl TryFrom<&str> for ConnectionManager
impl TryFrom<&str> for ConnectionManager
Source§impl TryFrom<(&str, ResolverConfig, ResolverOpts)> for ConnectionManager
impl TryFrom<(&str, ResolverConfig, ResolverOpts)> for ConnectionManager
Source§type Error = MemcacheError
type Error = MemcacheError
The type returned in the event of a conversion error.
Source§fn try_from(
value: (&str, ResolverConfig, ResolverOpts),
) -> Result<Self, Self::Error>
fn try_from( value: (&str, ResolverConfig, ResolverOpts), ) -> Result<Self, Self::Error>
Performs the conversion.
Source§impl TryFrom<(Url, ResolverConfig, ResolverOpts)> for ConnectionManager
impl TryFrom<(Url, ResolverConfig, ResolverOpts)> for ConnectionManager
Source§type Error = MemcacheError
type Error = MemcacheError
The type returned in the event of a conversion error.
Source§fn try_from(
value: (Url, ResolverConfig, ResolverOpts),
) -> Result<Self, Self::Error>
fn try_from( value: (Url, ResolverConfig, ResolverOpts), ) -> Result<Self, Self::Error>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for ConnectionManager
impl !RefUnwindSafe for ConnectionManager
impl Send for ConnectionManager
impl Sync for ConnectionManager
impl Unpin for ConnectionManager
impl !UnwindSafe for ConnectionManager
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