Skip to main content

ToMemcacheValue

Trait ToMemcacheValue 

Source
pub trait ToMemcacheValue {
    // Required method
    fn to_memcache_value(self) -> Value;
}
Expand description

Types that can be stored as a memcached value.

Numeric and boolean types are tagged with the same marker flags the Java clients use, so they can be read back as the corresponding Java type. Raw byte containers and strings are stored untagged (flags 0) as generic blobs, which any memcached client can read.

Required Methods§

Source

fn to_memcache_value(self) -> Value

Encode self into a Value.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl ToMemcacheValue for &[u8]

Source§

impl ToMemcacheValue for &str

Source§

impl ToMemcacheValue for Bytes

Source§

impl ToMemcacheValue for String

Source§

impl ToMemcacheValue for Vec<u8>

Source§

impl ToMemcacheValue for bool

Source§

impl ToMemcacheValue for i32

Source§

impl ToMemcacheValue for i64

Source§

impl ToMemcacheValue for u64

Implementors§