#[non_exhaustive]pub struct HtonCapabilities(/* private fields */);Expand description
The set of engine-level features a Handlerton
opts into.
Each capability gates a group of handlerton callbacks. A group will be
wired into the handlerton struct only when its bit is set here, because
MySQL reads a non-NULL function pointer as a declaration that the engine
supports that feature — a non-NULL commit, for example, marks the engine
transactional. Declaring a capability the engine does not implement would
route work to callbacks that cannot honour it, so default to the smallest
set that is actually backed by code.
Combine capabilities with |:
use mysql_handler::hton::HtonCapabilities;
let caps = HtonCapabilities::TRANSACTIONS | HtonCapabilities::SAVEPOINTS;
assert!(caps.contains(HtonCapabilities::TRANSACTIONS));
assert!(!caps.contains(HtonCapabilities::XA));Implementations§
Source§impl HtonCapabilities
impl HtonCapabilities
Sourcepub const TRANSACTIONS: Self
pub const TRANSACTIONS: Self
Transaction callbacks (commit, rollback, prepare)
Sourcepub const SAVEPOINTS: Self
pub const SAVEPOINTS: Self
Savepoint callbacks (savepoint_set, savepoint_rollback, …)
Sourcepub const SECONDARY_ENGINE: Self
pub const SECONDARY_ENGINE: Self
Secondary-engine callbacks (prepare_secondary_engine, …)
Sourcepub const PAGE_TRACKING: Self
pub const PAGE_TRACKING: Self
Page-tracking sub-callbacks
Sourcepub const PARTITIONING: Self
pub const PARTITIONING: Self
Partitioning support: gates the partition_flags accessor on the
handlerton. A non-NULL partition_flags pointer signals MySQL that the
engine implements handler::get_partition_handler, so this must stay
off for a non-partitioning engine.
Sourcepub const TABLESPACES: Self
pub const TABLESPACES: Self
Tablespace ownership: gates the tablespace callbacks (get_tablespace,
alter_tablespace, upgrade_tablespace, …). Non-NULL pointers tell
MySQL the engine owns tablespaces (InnoDB-style); leave off for a
tablespace-less engine to keep MySQL from routing tablespace work here.
Sourcepub const DICT_BACKEND: Self
pub const DICT_BACKEND: Self
Data-dictionary backend: gates the dict_* callbacks. A non-DD-backend
engine (anything other than the DD storage backend itself) must keep
these unwired, otherwise MySQL routes dictionary work to an engine that
cannot honour it.
Sourcepub const ENGINE_LOG: Self
pub const ENGINE_LOG: Self
Engine-owned redo / transaction log: gates lock_hton_log,
unlock_hton_log, collect_hton_log_info, and redo_log_set_state.
Declared by engines whose log is collected by
performance_schema.log_status.
Sourcepub const ENCRYPTION: Self
pub const ENCRYPTION: Self
Encryption support: gates rotate_encryption_master_key. Non-NULL
signals MySQL that the engine participates in master-key rotation, so
leave it off for a non-encrypting engine.
Sourcepub const fn empty() -> Self
pub const fn empty() -> Self
An empty capability set: a handler-only engine (the zero-config default)
Trait Implementations§
Source§impl BitOr for HtonCapabilities
impl BitOr for HtonCapabilities
Source§impl Clone for HtonCapabilities
impl Clone for HtonCapabilities
Source§fn clone(&self) -> HtonCapabilities
fn clone(&self) -> HtonCapabilities
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for HtonCapabilities
Source§impl Debug for HtonCapabilities
impl Debug for HtonCapabilities
impl Eq for HtonCapabilities
Source§impl PartialEq for HtonCapabilities
impl PartialEq for HtonCapabilities
Source§fn eq(&self, other: &HtonCapabilities) -> bool
fn eq(&self, other: &HtonCapabilities) -> bool
self and other values to be equal, and is used by ==.