pub struct ClientConfig<C, P>where
C: Connection,
P: Compressor,{ /* private fields */ }Expand description
Set configuration values for a memcached client.
Implementations§
Source§impl<C, P> ClientConfig<C, P>where
C: Connection,
P: Compressor,
impl<C, P> ClientConfig<C, P>where
C: Connection,
P: Compressor,
Sourcepub fn new(endpoints: Vec<String>, compressor: P) -> ClientConfig<C, P>
pub fn new(endpoints: Vec<String>, compressor: P) -> ClientConfig<C, P>
Create a new client config from the given memcached servers and
compressor. If no compression is desired, then use
ClientConfig::new_uncompressed
Source§impl<C> ClientConfig<C, NoCompressor>where
C: Connection,
impl<C> ClientConfig<C, NoCompressor>where
C: Connection,
Sourcepub fn new_uncompressed(endpoints: Vec<String>) -> ClientConfig<C, NoCompressor>
pub fn new_uncompressed(endpoints: Vec<String>) -> ClientConfig<C, NoCompressor>
Create a new client config with no compression.
Trait Implementations§
Source§impl<C, P> Clone for ClientConfig<C, P>
impl<C, P> Clone for ClientConfig<C, P>
Source§fn clone(&self) -> ClientConfig<C, P>
fn clone(&self) -> ClientConfig<C, P>
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<C, P> Debug for ClientConfig<C, P>
impl<C, P> Debug for ClientConfig<C, P>
Source§impl<C, P> Manager for ClientConfig<C, P>where
C: Connection,
P: Compressor,
impl<C, P> Manager for ClientConfig<C, P>where
C: Connection,
P: Compressor,
Source§fn create<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<<ClientConfig<C, P> as Manager>::Type, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
ClientConfig<C, P>: 'async_trait,
fn create<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<<ClientConfig<C, P> as Manager>::Type, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
ClientConfig<C, P>: 'async_trait,
Creates a new instance of
Manager::Type.Source§fn recycle<'life0, 'life1, 'async_trait>(
&'life0 self,
client: &'life1 mut <ClientConfig<C, P> as Manager>::Type,
) -> Pin<Box<dyn Future<Output = Result<(), RecycleError<Error>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
ClientConfig<C, P>: 'async_trait,
fn recycle<'life0, 'life1, 'async_trait>(
&'life0 self,
client: &'life1 mut <ClientConfig<C, P> as Manager>::Type,
) -> Pin<Box<dyn Future<Output = Result<(), RecycleError<Error>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
ClientConfig<C, P>: 'async_trait,
Tries to recycle an instance of
Manager::Type. Read moreAuto Trait Implementations§
impl<C, P> Freeze for ClientConfig<C, P>where
P: Freeze,
impl<C, P> RefUnwindSafe for ClientConfig<C, P>where
P: RefUnwindSafe,
C: RefUnwindSafe,
impl<C, P> Send for ClientConfig<C, P>
impl<C, P> Sync for ClientConfig<C, P>
impl<C, P> Unpin for ClientConfig<C, P>
impl<C, P> UnwindSafe for ClientConfig<C, P>where
P: UnwindSafe,
C: UnwindSafe,
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