pub fn async_put(&self, key: &str, value: &str) -> Result<AsyncHandle, Status> {
        let (_key, key_cstr) = c_convert(key);
        let (_v, v_cstr) = c_convert_void(value);
        let mut async_handle = mcas_async_handle_t {
            internal: std::ptr::null_mut(),
            response_data: std::ptr::null_mut(),
        };

        let rc = unsafe {
            mcas_async_put_ex(
                self.pool,
                key_cstr,
                v_cstr,
                value.len() as u64,
                0, /* flags */
                &mut async_handle,
            )
        };
        if rc == 0 {
            return Ok(AsyncHandle::new(
                self.pool.session,
                async_handle,
                value.len() as u64,
            ));
        }
        Err(rc)
    }
/// Asynchronously put a key-value pair into pool (copy performed)
///
/// # Examples
///
/// ```ignore
/// let handle = pool.aysnc_put("cat", "Jenny").expect("put failed");
/// while handle.check_completion().unwrap() == false {
///   println!("waiting {:?}", handle);
/// }
/// ```    
Asynchronously put a key-value pair into pool (copy performed)
Asynchronously put a key - value pair into pool ( copy performed )
pub fn async_put(&self, key: &str, value: &str) -> Result<AsyncHandle, Status> {
        let (_key, key_cstr) = c_convert(key);
        let (_v, v_cstr) = c_convert_void(value);
        let mut async_handle = mcas_async_handle_t {
            internal: std::ptr::null_mut(),
            response_data: std::ptr::null_mut(),
        };
        let rc = unsafe {
            mcas_async_put_ex(
                self.pool,
                key_cstr,
                v_cstr,
                value.len() as u64,
                0, /* flags */
                &mut async_handle,
            )
        };
        if rc == 0 {
            return Ok(AsyncHandle::new(
                self.pool.session,
                async_handle,
                value.len() as u64,
            ));
        }
        Err(rc)
    }
pub fn async_put ( & self , key : & str , value : & str ) -> Result < AsyncHandle , Status > { let ( _key , key_cstr ) = c_convert ( key ) ; let ( _v , v_cstr ) = c_convert_void ( value ) ; let mut async_handle = mcas_async_handle_t { internal : std :: ptr :: null_mut ( ) , response_data : std :: ptr :: null_mut ( ) , } ; let rc = unsafe { mcas_async_put_ex ( self . pool , key_cstr , v_cstr , value . len ( ) as u64 , 0 , /* flags */ & mut async_handle , ) } ; if rc == 0 { return Ok ( AsyncHandle :: new ( self . pool . session , async_handle , value . len ( ) as u64 , ) ) ; } Err ( rc ) }
Asynchronously put a key-value pair into pool (copy performed)
Asynchronously put a key - value pair into pool ( copy performed )
&self
key
&str
value
&str
examples
```ignore
let handle = pool.aysnc_put("cat", "Jenny").expect("put failed");
while handle.check_completion().unwrap() == false {
println!("waiting {:?}", handle);
}
```
` ` ` ignore let handle = pool . aysnc_put ( " cat " " Jenny " ) . expect ( " put failed " ) ; while handle . check_completion () . unwrap () == false { println! ( " waiting { : ? } " handle ) ; } ` ` `