Struct vmemcached::ConnectionManager
source · [−]pub struct ConnectionManager { /* private fields */ }Expand description
A bb8::ManageConnection for memcache_async::ascii::Protocol.
Implementations
sourceimpl 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
sourceimpl Clone for ConnectionManager
impl Clone for ConnectionManager
sourcefn clone(&self) -> ConnectionManager
fn clone(&self) -> ConnectionManager
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for ConnectionManager
impl Debug for ConnectionManager
sourceimpl ManageConnection for ConnectionManager
impl ManageConnection for ConnectionManager
type Connection = Connection
type Connection = Connection
The connection type this manager deals with.
type Error = MemcacheError
type Error = MemcacheError
The error type returned by Connections.
sourcefn connect<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Self::Connection, Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn connect<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Self::Connection, Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Attempts to create a new connection.
sourcefn 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
'life0: 'async_trait,
'life1: 'async_trait,
Self: '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
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Determines if the connection is still connected to the database.
sourcefn 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.
sourceimpl TryFrom<&'_ str> for ConnectionManager
impl TryFrom<&'_ str> for ConnectionManager
sourceimpl TryFrom<(&'_ str, ResolverConfig, ResolverOpts)> for ConnectionManager
impl TryFrom<(&'_ str, ResolverConfig, ResolverOpts)> for ConnectionManager
type Error = MemcacheError
type Error = MemcacheError
The type returned in the event of a conversion error.
sourcefn try_from(
value: (&str, ResolverConfig, ResolverOpts)
) -> Result<Self, Self::Error>
fn try_from(
value: (&str, ResolverConfig, ResolverOpts)
) -> Result<Self, Self::Error>
Performs the conversion.
sourceimpl TryFrom<(Url, ResolverConfig, ResolverOpts)> for ConnectionManager
impl TryFrom<(Url, ResolverConfig, ResolverOpts)> for ConnectionManager
type Error = MemcacheError
type Error = MemcacheError
The type returned in the event of a conversion error.
sourcefn 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 !RefUnwindSafe for ConnectionManager
impl Send for ConnectionManager
impl Sync for ConnectionManager
impl Unpin for ConnectionManager
impl !UnwindSafe for ConnectionManager
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more