#[repr(C)]pub struct btck_NotificationInterfaceCallbacks {
pub user_data: *mut c_void,
pub user_data_destroy: btck_DestroyCallback,
pub block_tip: btck_NotifyBlockTip,
pub header_tip: btck_NotifyHeaderTip,
pub progress: btck_NotifyProgress,
pub warning_set: btck_NotifyWarningSet,
pub warning_unset: btck_NotifyWarningUnset,
pub flush_error: btck_NotifyFlushError,
pub fatal_error: btck_NotifyFatalError,
}Expand description
A struct for holding the kernel notification callbacks. The user data pointer may be used to point to user-defined structures to make processing the notifications easier.
If user_data_destroy is provided, the kernel will automatically call this callback to clean up user_data when the notification interface object is destroyed. If user_data_destroy is NULL, it is the user’s responsibility to ensure that the user_data outlives the kernel objects. Notifications can occur even as kernel objects are deleted, so care has to be taken to ensure safe unwinding.
Fields§
§user_data: *mut c_void!< Holds a user-defined opaque structure that is passed to the notification callbacks. !< If user_data_destroy is also defined ownership of the user_data is passed to the !< created context options and subsequently context.
user_data_destroy: btck_DestroyCallback!< Frees the provided user data structure.
block_tip: btck_NotifyBlockTip!< The chain’s tip was updated to the provided block entry.
header_tip: btck_NotifyHeaderTip!< A new best block header was added.
progress: btck_NotifyProgress!< Reports on current block synchronization progress.
warning_set: btck_NotifyWarningSet!< A warning issued by the kernel library during validation.
warning_unset: btck_NotifyWarningUnset!< A previous condition leading to the issuance of a warning is no longer given.
flush_error: btck_NotifyFlushError!< An error encountered when flushing data to disk.
fatal_error: btck_NotifyFatalError!< An unrecoverable system error encountered by the library.
Trait Implementations§
Source§impl Clone for btck_NotificationInterfaceCallbacks
impl Clone for btck_NotificationInterfaceCallbacks
Source§fn clone(&self) -> btck_NotificationInterfaceCallbacks
fn clone(&self) -> btck_NotificationInterfaceCallbacks
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more