pub fn async_put_direct(
        &self,
        key: &str,
        direct_buffer: &DirectMemory,
    ) -> Result<AsyncHandle, Status> {
        let (_key, key_cstr) = c_convert(key);
        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_direct_ex(
                self.pool,
                key_cstr,
                direct_buffer.ptr,
                direct_buffer.size,
                direct_buffer.handle,
                0, /* flags */
                &mut async_handle,
            )
        };
        if rc == 0 {
            return Ok(AsyncHandle::new(
                self.pool.session,
                async_handle,
                direct_buffer.size,
            ));
        }
        Err(rc)
    }
/// Asynchronously put a value using direct memory
///
/// # Examples
///
/// ```ignore
/// let mut handle = pool
///                  .async_put_direct("asyncDirectKey", &m)
///                  .expect("async_put_direct failed");
/// println!("handle: {:?}", handle);
///
/// while handle.check_completion().expect("check completion failed") == false {
///   println!("async_put_direct waiting for response ... {:?}", handle);
///   thread::sleep(Duration::from_millis(1));
/// }
/// ```
Asynchronously put a value using direct memory
Asynchronously put a value using direct memory
pub fn async_put_direct(
        &self,
        key: &str,
        direct_buffer: &DirectMemory,
    ) -> Result<AsyncHandle, Status> {
        let (_key, key_cstr) = c_convert(key);
        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_direct_ex(
                self.pool,
                key_cstr,
                direct_buffer.ptr,
                direct_buffer.size,
                direct_buffer.handle,
                0, /* flags */
                &mut async_handle,
            )
        };
        if rc == 0 {
            return Ok(AsyncHandle::new(
                self.pool.session,
                async_handle,
                direct_buffer.size,
            ));
        }
        Err(rc)
    }
pub fn async_put_direct ( & self , key : & str , direct_buffer : & DirectMemory , ) -> Result < AsyncHandle , Status > { let ( _key , key_cstr ) = c_convert ( key ) ; 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_direct_ex ( self . pool , key_cstr , direct_buffer . ptr , direct_buffer . size , direct_buffer . handle , 0 , /* flags */ & mut async_handle , ) } ; if rc == 0 { return Ok ( AsyncHandle :: new ( self . pool . session , async_handle , direct_buffer . size , ) ) ; } Err ( rc ) }
Asynchronously put a value using direct memory
Asynchronously put a value using direct memory
&self
key
&str
direct_buffer
&DirectMemory
examples
```ignore
let mut handle = pool
.async_put_direct("asyncDirectKey", &m)
.expect("async_put_direct failed");
println!("handle: {:?}", handle).

while handle.check_completion().expect("check completion failed") == false {
println!("async_put_direct waiting for response ...
` ` ` ignore let mut handle = pool . async_put_direct ( " asyncDirectKey " &m ) . expect ( " async_put_direct failed " ) ; println! ( " handle : { : ? } " handle ) . while handle . check_completion () . expect ( " check completion failed " ) == false { println! ( " async_put_direct waiting for response ...