pub fn allocate_direct_memory(
        &mut self,
        size_in_bytes: size_t,
    ) -> Result<DirectMemory, Status> {
        let mut handle: *mut std::os::raw::c_void = std::ptr::null_mut();
        let mut ptr: *mut std::os::raw::c_void = std::ptr::null_mut();
        let rc = unsafe {
            mcas_allocate_direct_memory(self.session, size_in_bytes, &mut ptr, &mut handle)
        };
        let result = DirectMemory {
            session: self.session,
            handle,
            ptr,
            size: size_in_bytes,
        };
        if rc != 0 {
            return Err(rc);
        }
        Ok(result)
    }
/// Allocate direct memory for zero-copy operation
///
Allocate direct memory for zero-copy operation
Allocate direct memory for zero - copy operation
pub fn allocate_direct_memory(
        &mut self,
        size_in_bytes: size_t,
    ) -> Result<DirectMemory, Status> {
        let mut handle: *mut std::os::raw::c_void = std::ptr::null_mut();
        let mut ptr: *mut std::os::raw::c_void = std::ptr::null_mut();
        let rc = unsafe {
            mcas_allocate_direct_memory(self.session, size_in_bytes, &mut ptr, &mut handle)
        };
        let result = DirectMemory {
            session: self.session,
            handle,
            ptr,
            size: size_in_bytes,
        };
        if rc != 0 {
            return Err(rc);
        }
        Ok(result)
    }
pub fn allocate_direct_memory ( & mut self , size_in_bytes : size_t , ) -> Result < DirectMemory , Status > { let mut handle : * mut std :: os :: raw :: c_void = std :: ptr :: null_mut ( ) ; let mut ptr : * mut std :: os :: raw :: c_void = std :: ptr :: null_mut ( ) ; let rc = unsafe { mcas_allocate_direct_memory ( self . session , size_in_bytes , & mut ptr , & mut handle ) } ; let result = DirectMemory { session : self . session , handle , ptr , size : size_in_bytes , } ; if rc != 0 { return Err ( rc ) ; } Ok ( result ) }
Allocate direct memory for zero-copy operation
Allocate direct memory for zero - copy operation
&mut self
size_in_bytes
size_t