Skip to main content

__wt_event_handler

Struct __wt_event_handler 

Source
#[repr(C)]
pub struct __wt_event_handler { pub handle_error: Option<unsafe extern "C" fn(handler: *mut WT_EVENT_HANDLER, session: *mut WT_SESSION, error: c_int, message: *const c_char) -> c_int>, pub handle_message: Option<unsafe extern "C" fn(handler: *mut WT_EVENT_HANDLER, session: *mut WT_SESSION, message: *const c_char) -> c_int>, pub handle_progress: Option<unsafe extern "C" fn(handler: *mut WT_EVENT_HANDLER, session: *mut WT_SESSION, operation: *const c_char, progress: u64) -> c_int>, pub handle_close: Option<unsafe extern "C" fn(handler: *mut WT_EVENT_HANDLER, session: *mut WT_SESSION, cursor: *mut WT_CURSOR) -> c_int>, }
Expand description

The interface implemented by applications to handle error, informational and progress messages. Entries set to NULL are ignored and the default handlers will continue to be used.

Fields§

§handle_error: Option<unsafe extern "C" fn(handler: *mut WT_EVENT_HANDLER, session: *mut WT_SESSION, error: c_int, message: *const c_char) -> c_int>

Callback to handle error messages; by default, error messages are written to the stderr stream. See @ref event_message_handling for more information.

Errors that require the application to exit and restart will have their \c error value set to \c WT_PANIC. The application can exit immediately when \c WT_PANIC is passed to an event handler, there is no reason to return into WiredTiger.

Event handler returns are not ignored: if the handler returns non-zero, the error may cause the WiredTiger function posting the event to fail, and may even cause operation or library failure.

@param session the WiredTiger session handle in use when the error was generated. The handle may have been created by the application or automatically by WiredTiger. @param error a return value from a WiredTiger, ISO C, or POSIX standard API, which can be converted to a string using WT_SESSION::strerror @param message an error string

§handle_message: Option<unsafe extern "C" fn(handler: *mut WT_EVENT_HANDLER, session: *mut WT_SESSION, message: *const c_char) -> c_int>

Callback to handle informational messages; by default, informational messages are written to the stdout stream. See @ref event_message_handling for more information.

Message handler returns are not ignored: if the handler returns non-zero, the error may cause the WiredTiger function posting the event to fail, and may even cause operation or library failure.

@param session the WiredTiger session handle in use when the message was generated. The handle may have been created by the application or automatically by WiredTiger. @param message an informational string

§handle_progress: Option<unsafe extern "C" fn(handler: *mut WT_EVENT_HANDLER, session: *mut WT_SESSION, operation: *const c_char, progress: u64) -> c_int>

Callback to handle progress messages; by default, progress messages are not written. See @ref event_message_handling for more information.

Progress handler returns are not ignored: if the handler returns non-zero, the error may cause the WiredTiger function posting the event to fail, and may even cause operation or library failure.

@param session the WiredTiger session handle in use when the progress message was generated. The handle may have been created by the application or automatically by WiredTiger. @param operation a string representation of the operation @param progress a counter

§handle_close: Option<unsafe extern "C" fn(handler: *mut WT_EVENT_HANDLER, session: *mut WT_SESSION, cursor: *mut WT_CURSOR) -> c_int>

Callback to handle automatic close of a WiredTiger handle.

Close handler returns are not ignored: if the handler returns non-zero, the error may cause the WiredTiger function posting the event to fail, and may even cause operation or library failure.

@param session The session handle that is being closed if the cursor parameter is NULL. @param cursor The cursor handle that is being closed, or NULL if it is a session handle being closed.

Trait Implementations§

Source§

impl Clone for __wt_event_handler

Source§

fn clone(&self) -> __wt_event_handler

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for __wt_event_handler

Source§

impl Debug for __wt_event_handler

Source§

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

Formats the value using the given formatter. Read more

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.