pub struct NoHook;Expand description
Default no-op hook. All branches are eliminated at compile time.
Trait Implementations§
Source§impl<K: Key, T> TypedWriteHook<K, T> for NoHook
Available on crate feature typed-tree only.
impl<K: Key, T> TypedWriteHook<K, T> for NoHook
Available on crate feature
typed-tree only.Source§const NEEDS_OLD_VALUE: bool = false
const NEEDS_OLD_VALUE: bool = false
Unused for TypedTree/TypedMap/ZeroTree/ZeroMap — old value is always
provided (it lives in memory). Kept for trait uniformity with
WriteHook.const NEEDS_INIT: bool = false
const NEEDS_WRITE: bool = false
const PROJECTS: bool = false
Source§const COUNTS: bool = false
const COUNTS: bool = false
Whether this hook maintains engine counters. Compile-time, so an
uncounted collection’s write path is unchanged.
Source§const CLAIMS: bool = false
const CLAIMS: bool = false
Whether this hook declares claims into a unique namespace (T10).
Compile-time, so an unclaimed collection’s write path is unchanged.
fn on_write(&self, _key: &K, _old: Option<&T>, _new: Option<&T>)
fn project( &self, _key: &K, _value: &T, _sink: &mut ProjectionSink<'_>, ) -> DbResult<()>
const WATCHES: bool = false
fn watch_channel(&self) -> Option<&Arc<WatchChannel<K>>>
fn watch_old(&self) -> bool
const EXPIRES: bool = false
const TTL_REVISION: u32 = 0
fn deadline(&self, _key: &K, _value: &T) -> Option<u64>
fn projection_targets(&self) -> Option<&IndexTargets>
fn projection_limits(&self) -> (usize, usize)
fn counter_project( &self, _key: &K, _value: &T, _sink: &mut CounterSink<'_>, ) -> DbResult<()>
fn counter_targets(&self) -> Option<&CounterTargets>
fn claim_project( &self, _key: &K, _value: &T, _sink: &mut ClaimSink<'_>, ) -> DbResult<()>
fn claim_targets(&self) -> Option<&UniqueTargets>
const EMITS: bool = false
fn stream_project( &self, _key: &K, _old: Option<&T>, _new: Option<&T>, _sink: &mut EmitSink<'_>, ) -> DbResult<()>
fn stream_targets(&self) -> Option<&QueueTargets>
Source§impl<K: Key> WriteHook<K> for NoHook
impl<K: Key> WriteHook<K> for NoHook
const NEEDS_OLD_VALUE: bool = false
const NEEDS_INIT: bool = false
const NEEDS_WRITE: bool = false
const PROJECTS: bool = false
Source§const COUNTS: bool = false
const COUNTS: bool = false
Whether this hook maintains engine counters. Compile-time, so an
uncounted collection’s write path is unchanged.
Source§const CLAIMS: bool = false
const CLAIMS: bool = false
Whether this hook declares claims into a unique namespace (T10).
Compile-time, so an unclaimed collection’s write path is unchanged.
const EMITS: bool = false
Source§fn on_write(&self, _key: &K, _old: Option<&[u8]>, _new: Option<&[u8]>)
fn on_write(&self, _key: &K, _old: Option<&[u8]>, _new: Option<&[u8]>)
Called after a successful write operation. Read more
Source§fn on_init(&self, _key: &K, _value: &[u8])
fn on_init(&self, _key: &K, _value: &[u8])
Called once per live entry during collection open.
Fires after recovery and migration are complete, with the final value. Read more
fn project( &self, _key: &K, _old: Option<&[u8]>, _new: Option<&[u8]>, _sink: &mut ProjectionSink<'_>, ) -> DbResult<()>
const WATCHES: bool = false
fn watch_channel(&self) -> Option<&Arc<WatchChannel<K>>>
Source§fn watch_old(&self) -> bool
fn watch_old(&self) -> bool
Whether the watch carrier requests the previous value in published
events. Kept separate from
NEEDS_OLD_VALUE, which may be true only
for an unrelated write hook.const EXPIRES: bool = false
const TTL_REVISION: u32 = 0
fn deadline(&self, _key: &K, _value: &[u8]) -> Option<u64>
Source§fn ttl_decode_failed(&self, _value: &[u8]) -> bool
fn ttl_decode_failed(&self, _value: &[u8]) -> bool
True when
value bytes cannot be decoded for TTL stage-2 (Var families).
Distinguishes decode errors from a None policy deadline.fn projection_targets(&self) -> Option<&IndexTargets>
fn projection_limits(&self) -> (usize, usize)
Source§fn counter_project(
&self,
_key: &K,
_old: Option<&[u8]>,
_new: Option<&[u8]>,
_sink: &mut CounterSink<'_>,
) -> DbResult<()>
fn counter_project( &self, _key: &K, _old: Option<&[u8]>, _new: Option<&[u8]>, _sink: &mut CounterSink<'_>, ) -> DbResult<()>
Byte-snapshot counter projection — mirrors
WriteHook::project’s
shape (key, old snapshot, new snapshot, sink).fn counter_targets(&self) -> Option<&CounterTargets>
Source§fn claim_project(
&self,
_key: &K,
_old: Option<&[u8]>,
_new: Option<&[u8]>,
_sink: &mut ClaimSink<'_>,
) -> DbResult<()>
fn claim_project( &self, _key: &K, _old: Option<&[u8]>, _new: Option<&[u8]>, _sink: &mut ClaimSink<'_>, ) -> DbResult<()>
Byte-snapshot claim projection — mirrors
WriteHook::project’s shape.fn claim_targets(&self) -> Option<&UniqueTargets>
fn stream_project( &self, _key: &K, _old: Option<&[u8]>, _new: Option<&[u8]>, _sink: &mut EmitSink<'_>, ) -> DbResult<()>
fn stream_targets(&self) -> Option<&QueueTargets>
Auto Trait Implementations§
impl Freeze for NoHook
impl RefUnwindSafe for NoHook
impl Send for NoHook
impl Sync for NoHook
impl Unpin for NoHook
impl UnsafeUnpin for NoHook
impl UnwindSafe for NoHook
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more