Skip to main content

NoHook

Struct NoHook 

Source
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.
Source§

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.
Source§

const NEEDS_INIT: bool = false

Source§

const NEEDS_WRITE: bool = false

Source§

const PROJECTS: bool = false

Source§

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

Whether this hook declares claims into a unique namespace (T10). Compile-time, so an unclaimed collection’s write path is unchanged.
Source§

fn on_write(&self, _key: &K, _old: Option<&T>, _new: Option<&T>)

Source§

fn on_init(&self, _key: &K, _value: &T)

See WriteHook::on_init for reentrancy guarantees.
Source§

fn project( &self, _key: &K, _value: &T, _sink: &mut ProjectionSink<'_>, ) -> DbResult<()>

Source§

const WATCHES: bool = false

Source§

fn watch_channel(&self) -> Option<&Arc<WatchChannel<K>>>

Source§

fn watch_old(&self) -> bool

Source§

const EXPIRES: bool = false

Source§

const TTL_REVISION: u32 = 0

Source§

fn deadline(&self, _key: &K, _value: &T) -> Option<u64>

Source§

fn projection_targets(&self) -> Option<&IndexTargets>

Source§

fn projection_limits(&self) -> (usize, usize)

Source§

fn counter_project( &self, _key: &K, _value: &T, _sink: &mut CounterSink<'_>, ) -> DbResult<()>

Source§

fn counter_targets(&self) -> Option<&CounterTargets>

Source§

fn claim_project( &self, _key: &K, _value: &T, _sink: &mut ClaimSink<'_>, ) -> DbResult<()>

Source§

fn claim_targets(&self) -> Option<&UniqueTargets>

Source§

const EMITS: bool = false

Source§

fn stream_project( &self, _key: &K, _old: Option<&T>, _new: Option<&T>, _sink: &mut EmitSink<'_>, ) -> DbResult<()>

Source§

fn stream_targets(&self) -> Option<&QueueTargets>

Source§

impl<K: Key> WriteHook<K> for NoHook

Source§

const NEEDS_OLD_VALUE: bool = false

Source§

const NEEDS_INIT: bool = false

Source§

const NEEDS_WRITE: bool = false

Source§

const PROJECTS: bool = false

Source§

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

Whether this hook declares claims into a unique namespace (T10). Compile-time, so an unclaimed collection’s write path is unchanged.
Source§

const EMITS: bool = false

Source§

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])

Called once per live entry during collection open. Fires after recovery and migration are complete, with the final value. Read more
Source§

fn project( &self, _key: &K, _old: Option<&[u8]>, _new: Option<&[u8]>, _sink: &mut ProjectionSink<'_>, ) -> DbResult<()>

Source§

const WATCHES: bool = false

Source§

fn watch_channel(&self) -> Option<&Arc<WatchChannel<K>>>

Source§

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.
Source§

const EXPIRES: bool = false

Source§

const TTL_REVISION: u32 = 0

Source§

fn deadline(&self, _key: &K, _value: &[u8]) -> Option<u64>

Source§

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.
Source§

fn projection_targets(&self) -> Option<&IndexTargets>

Source§

fn projection_limits(&self) -> (usize, usize)

Source§

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).
Source§

fn counter_targets(&self) -> Option<&CounterTargets>

Source§

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.
Source§

fn claim_targets(&self) -> Option<&UniqueTargets>

Source§

fn stream_project( &self, _key: &K, _old: Option<&[u8]>, _new: Option<&[u8]>, _sink: &mut EmitSink<'_>, ) -> DbResult<()>

Source§

fn stream_targets(&self) -> Option<&QueueTargets>

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

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

Source§

type Error = !

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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more