pub struct ClientConfig<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) -> Self
pub fn new(endpoints: Vec<String>, compressor: P) -> Self
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>) -> Self
pub fn new_uncompressed(endpoints: Vec<String>) -> Self
Create a new client config with no compression.
Trait Implementations§
Source§impl<C: Clone + Connection, P: Clone + Compressor> Clone for ClientConfig<C, P>
impl<C: Clone + Connection, P: Clone + Compressor> 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: Debug + Connection, P: Debug + Compressor> Debug for ClientConfig<C, P>
impl<C: Debug + Connection, P: Debug + Compressor> 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<Self::Type, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn create<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Self::Type, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Creates a new instance of
Manager::Type
.Auto 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