pub fn put(&mut self, key: &str, value: &str) -> Result<(), Status> {
        let (_key, key_cstr) = c_convert(key);
        let (_v, v_cstr) = c_convert_void(value);
        let rc = unsafe {
            mcas_put_ex(
                self.pool,
                key_cstr,
                v_cstr,
                value.len() as u64,
                0, /* flags */
            )
        };
        if rc == 0 {
            return Ok(());
        }
        Err(rc)
    }
/// Put a key-value pair into pool (copy performed)
///
/// # Examples
///
/// ```ignore
/// pool.put("cat", "Jenny").expect("put failed");
/// ```    
Put a key-value pair into pool (copy performed)
Put a key - value pair into pool ( copy performed )
pub fn put(&mut self, key: &str, value: &str) -> Result<(), Status> {
        let (_key, key_cstr) = c_convert(key);
        let (_v, v_cstr) = c_convert_void(value);
        let rc = unsafe {
            mcas_put_ex(
                self.pool,
                key_cstr,
                v_cstr,
                value.len() as u64,
                0, /* flags */
            )
        };
        if rc == 0 {
            return Ok(());
        }
        Err(rc)
    }
pub fn put ( & mut self , key : & str , value : & str ) -> Result < ( ) , Status > { let ( _key , key_cstr ) = c_convert ( key ) ; let ( _v , v_cstr ) = c_convert_void ( value ) ; let rc = unsafe { mcas_put_ex ( self . pool , key_cstr , v_cstr , value . len ( ) as u64 , 0 , /* flags */ ) } ; if rc == 0 { return Ok ( ( ) ) ; } Err ( rc ) }
Put a key-value pair into pool (copy performed)
Put a key - value pair into pool ( copy performed )
&mut self
key
&str
value
&str
examples
None