__wt_async_op

Struct __wt_async_op 

Source
#[repr(C)]
pub struct __wt_async_op {
Show 16 fields pub connection: *mut WT_CONNECTION, pub key_format: *const c_char, pub value_format: *const c_char, pub app_private: *mut c_void, pub get_key: Option<unsafe extern "C" fn(op: *mut WT_ASYNC_OP, ...) -> c_int>, pub get_value: Option<unsafe extern "C" fn(op: *mut WT_ASYNC_OP, ...) -> c_int>, pub set_key: Option<unsafe extern "C" fn(op: *mut WT_ASYNC_OP, ...)>, pub set_value: Option<unsafe extern "C" fn(op: *mut WT_ASYNC_OP, ...)>, pub search: Option<unsafe extern "C" fn(op: *mut WT_ASYNC_OP) -> c_int>, pub insert: Option<unsafe extern "C" fn(op: *mut WT_ASYNC_OP) -> c_int>, pub update: Option<unsafe extern "C" fn(op: *mut WT_ASYNC_OP) -> c_int>, pub remove: Option<unsafe extern "C" fn(op: *mut WT_ASYNC_OP) -> c_int>, pub compact: Option<unsafe extern "C" fn(op: *mut WT_ASYNC_OP) -> c_int>, pub get_id: Option<unsafe extern "C" fn(op: *mut WT_ASYNC_OP) -> u64>, pub get_type: Option<unsafe extern "C" fn(op: *mut WT_ASYNC_OP) -> WT_ASYNC_OPTYPE>, pub c: WT_CURSOR,
}
Expand description

A WT_ASYNC_OP handle is the interface to an asynchronous operation.

An asynchronous operation describes a data manipulation to be performed asynchronously by a WiredTiger worker thread. These operations implement the CRUD (create, read, update and delete) operations. Each operation is a self-contained work unit. The operation will be performed in the context of the worker thread’s session. Each operation is performed within the context of a transaction. The application is notified of its completion with a callback. The transaction is resolved once the callback returns.

The table referenced in an operation must already exist.

Raw data is represented by key/value pairs of WT_ITEM structures, but operations can also provide access to fields within the key and value if the formats are described in the WT_SESSION::create method.

Thread safety: A WT_ASYNC_OP handle may not be shared between threads, see @ref threads for more information.

Fields§

§connection: *mut WT_CONNECTION

The connection for this operation.

§key_format: *const c_char

The format of the data packed into key items. See @ref packing for details. If not set, a default value of “u” is assumed, and applications must use WT_ITEM structures to manipulate untyped byte arrays.

§value_format: *const c_char

The format of the data packed into value items. See @ref packing for details. If not set, a default value of “u” is assumed, and applications must use WT_ITEM structures to manipulate untyped byte arrays.

§app_private: *mut c_void

A location for applications to store information that will be available in the callback from an async operation.

§get_key: Option<unsafe extern "C" fn(op: *mut WT_ASYNC_OP, ...) -> c_int>

@name Data access @{ / /*! Invoke the underlying WT_CURSOR::get_key method; see that method for configuration, return and error values.

@param op the operation handle @returns as described for WT_CURSOR::get_key

§get_value: Option<unsafe extern "C" fn(op: *mut WT_ASYNC_OP, ...) -> c_int>

Invoke the underlying WT_CURSOR::get_value method; see that method for configuration, return and error values.

@param op the operation handle @returns as described for WT_CURSOR::get_value

§set_key: Option<unsafe extern "C" fn(op: *mut WT_ASYNC_OP, ...)>

Invoke the underlying WT_CURSOR::set_key method; see that method for configuration, return and error values.

@param op the operation handle

§set_value: Option<unsafe extern "C" fn(op: *mut WT_ASYNC_OP, ...)>

Invoke the underlying WT_CURSOR::set_value method; see that method for configuration, return and error values.

@param op the operation handle

§search: Option<unsafe extern "C" fn(op: *mut WT_ASYNC_OP) -> c_int>

@name Positioning @{ / /*! Invoke the underlying WT_CURSOR::search method; see that method for configuration, return and error values.

@param op the operation handle @returns via the callback as described for WT_CURSOR::search

§insert: Option<unsafe extern "C" fn(op: *mut WT_ASYNC_OP) -> c_int>

@name Data modification @{ / /*! Invoke the underlying WT_CURSOR::insert method; see that method for configuration, return and error values.

@param op the operation handle @returns via the callback as described for WT_CURSOR::insert

§update: Option<unsafe extern "C" fn(op: *mut WT_ASYNC_OP) -> c_int>

Invoke the underlying WT_CURSOR::update method; see that method for configuration, return and error values.

@param op the operation handle @returns via the callback as described for WT_CURSOR::update

§remove: Option<unsafe extern "C" fn(op: *mut WT_ASYNC_OP) -> c_int>

Invoke the underlying WT_CURSOR::remove method; see that method for configuration, return and error values.

@param op the operation handle @returns via the callback as described for WT_CURSOR::remove

§compact: Option<unsafe extern "C" fn(op: *mut WT_ASYNC_OP) -> c_int>

@name Table operations @{ / /*! Invoke the underlying WT_SESSION::compact method; see that method for configuration, return and error values.

@param op the operation handle @returns via the callback as described for WT_SESSION::compact

§get_id: Option<unsafe extern "C" fn(op: *mut WT_ASYNC_OP) -> u64>

Get the unique identifier for this operation.

@snippet ex_async.c async get identifier

@param op the operation handle @returns the id of the operation

§get_type: Option<unsafe extern "C" fn(op: *mut WT_ASYNC_OP) -> WT_ASYNC_OPTYPE>

Get the type for this operation.

@snippet ex_async.c async get type

@param op the operation handle @returns the ::WT_ASYNC_OPTYPE of the operation

§c: WT_CURSOR

Trait Implementations§

Source§

impl Clone for __wt_async_op

Source§

fn clone(&self) -> __wt_async_op

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for __wt_async_op

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for __wt_async_op

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.