Skip to main content

L0Buffer

Struct L0Buffer 

Source
pub struct L0Buffer {
Show 33 fields pub graph: SimpleGraph, pub tombstones: HashMap<Eid, TombstoneEntry>, pub vertex_tombstones: HashSet<Vid>, pub edge_versions: HashMap<Eid, u64>, pub vertex_versions: HashMap<Vid, u64>, pub edge_properties: HashMap<Eid, Properties>, pub vertex_properties: HashMap<Vid, Properties>, pub edge_endpoints: HashMap<Eid, (Vid, Vid, u32)>, pub vertex_labels: HashMap<Vid, Vec<String>>, pub label_to_vids: HashMap<String, HashSet<Vid>>, pub vertex_label_overwrites: HashSet<Vid>, pub edge_types: HashMap<Eid, String>, pub current_version: u64, pub mutation_count: usize, pub mutation_stats: MutationStats, pub wal: Option<Arc<WriteAheadLog>>, pub wal_lsn_at_flush: u64, pub wal_lsn_at_start: u64, pub vertex_created_at: HashMap<Vid, i64>, pub vertex_updated_at: HashMap<Vid, i64>, pub edge_created_at: HashMap<Eid, i64>, pub edge_updated_at: HashMap<Eid, i64>, pub estimated_size: usize, pub constraint_index: HashMap<Vec<u8>, Vid>, pub merge_guard_index: HashMap<Vec<u8>, Vid>, pub edge_constraint_index: HashMap<Vec<u8>, Eid>, pub extid_index: HashMap<String, Vid>, pub vertex_partial_keys: HashMap<Vid, HashSet<String>>, pub edge_partial_keys: HashMap<Eid, HashSet<String>>, pub pending_embeddings: HashMap<Vid, String>, pub occ_read_seq: u64, pub occ_read_set: Option<Arc<Mutex<OccReadSet>>>, pub plugin_registry: Option<Arc<PluginRegistry>>,
}

Fields§

§graph: SimpleGraph

Graph topology using simple adjacency lists

§tombstones: HashMap<Eid, TombstoneEntry>

Soft-deleted edges (tombstones for LSM-style merging)

§vertex_tombstones: HashSet<Vid>

Soft-deleted vertices

§edge_versions: HashMap<Eid, u64>

Edge version tracking for MVCC

§vertex_versions: HashMap<Vid, u64>

Vertex version tracking for MVCC

§edge_properties: HashMap<Eid, Properties>

Edge properties (stored separately from topology)

§vertex_properties: HashMap<Vid, Properties>

Vertex properties (stored separately from topology)

§edge_endpoints: HashMap<Eid, (Vid, Vid, u32)>

Edge endpoint lookup: eid -> (src, dst, type)

§vertex_labels: HashMap<Vid, Vec<String>>

Vertex labels (VID -> list of label names) New in storage design: vertices can have multiple labels

§label_to_vids: HashMap<String, HashSet<Vid>>

Reverse index: label name → set of VIDs with that label. Maintained alongside vertex_labels for O(1) label-based vertex lookups.

§vertex_label_overwrites: HashSet<Vid>

Vids whose FULL label set was explicitly replaced by a label mutation (SET n:Label / REMOVE n:Label) in this buffer, via L0Buffer::set_vertex_labels. Distinguishes a deliberate label replacement from the empty vertex_labels entry a property-only write incidentally creates (entry().or_default()), so merge knows to REPLACE (not append) these vids’ labels and WriteSet::from_l0 knows they are conflictable writes. A transaction-buffer concept; empty on main L0.

§edge_types: HashMap<Eid, String>

Edge types (EID -> type name)

§current_version: u64

Current version counter

§mutation_count: usize

Mutation count for flush decisions

§mutation_stats: MutationStats

Per-type mutation counters for detailed statistics.

§wal: Option<Arc<WriteAheadLog>>

Write-ahead log for durability

§wal_lsn_at_flush: u64

WAL LSN at the time this L0 was rotated for flush. Used to ensure WAL truncation doesn’t remove entries needed by pending flushes.

§wal_lsn_at_start: u64

WAL LSN at the time this L0 became active (the previous rotation point).

Everything at or below this LSN is durable in L1 before this buffer’s own data begins; while the buffer is pending flush its committed WAL entries live strictly ABOVE it. It is therefore the floor below which WAL truncation and a published wal_high_water_mark may safely advance — using wal_lsn_at_flush (the high watermark) there would discard a pending buffer’s own not-yet-flushed entries (lost-commit on a graceful close after a failed flush).

§vertex_created_at: HashMap<Vid, i64>

Vertex creation timestamps (nanoseconds since epoch)

§vertex_updated_at: HashMap<Vid, i64>

Vertex update timestamps (nanoseconds since epoch)

§edge_created_at: HashMap<Eid, i64>

Edge creation timestamps (nanoseconds since epoch)

§edge_updated_at: HashMap<Eid, i64>

Edge update timestamps (nanoseconds since epoch)

§estimated_size: usize

Estimated size in bytes for memory limit enforcement. Incremented O(1) on each mutation to avoid O(V+E) size_bytes() calls.

§constraint_index: HashMap<Vec<u8>, Vid>

Per-constraint index for O(1) unique key checks. Key: constraint composite key (label + sorted property values serialized). Value: Vid that owns this key.

§merge_guard_index: HashMap<Vec<u8>, Vid>

Implicit MERGE-key guard for phantom-free MERGE without a declared UNIQUE constraint. Same key format as constraint_index (built by serialize_constraint_key), but populated only by a MERGE that creates a node, and re-probed at commit only against other concurrent MERGE-creates — so two concurrent MERGEs of the same key converge to one node (the loser aborts retriably) instead of silently duplicating, while a plain CREATE of the same properties is unaffected (it never registers a key). Tombstoned with the owning vid; transient (not rebuilt on recovery).

§edge_constraint_index: HashMap<Vec<u8>, Eid>

Per-edge-constraint index for O(1) unique edge-key checks. Mirrors constraint_index but keyed to a live edge’s Eid (built by serialize_constraint_key with the edge-type name as the discriminator). Populated by the edge-insert path for declared edge-type Unique/NodeKey constraints, tombstoned in apply_edge_deletion, and rebuilt from live edge properties on recovery.

§extid_index: HashMap<String, Vid>

Reverse index ext_id → owning vid for O(1) global ext_id uniqueness checks (Writer::check_extid_globally_unique previously scanned every vertex_properties map per insert — O(n²) ingest). Maintained by the vertex insert impls (synced to the post-CRDT-merge value) and by apply_vertex_deletion, so merge and WAL replay keep it consistent for free.

§vertex_partial_keys: HashMap<Vid, HashSet<String>>

Per-VID set of property keys that should land via Lance MergeInsert (partial-column update) at flush time. Populated by insert_vertex_partial; cleared by full-row inserts and deletes. A VID present here at flush time is emitted to the partial batch; absent VIDs flush via the existing full-row Append.

§edge_partial_keys: HashMap<Eid, HashSet<String>>

Edge analog of vertex_partial_keys (Round 12 §A). Populated by insert_edge_partial_full; cleared by full-row inserts and edge deletes. Per-edge-type delta-table flush honors these by emitting a MergeInsertBuilder source with only the touched schema columns plus eid, op, _version, _updated_at, and overflow_json (when an overflow prop was touched).

§pending_embeddings: HashMap<Vid, String>

Phase B (UniConfig::defer_embeddings): VIDs whose auto-embedding was skipped at insert time and is owed at flush. Value = primary label name (the rest of the embedding config is looked up from the schema at flush time). Drained by flush_stream_l1 before column extraction; entries are removed when the embedding lands in the vertex’s L0 property map.

§occ_read_seq: u64

Optimistic-concurrency read sequence (SSI). Stamped on a transaction’s private L0 at creation with the Writer’s commit-sequence at that moment, and consulted at commit to detect intervening conflicting commits. 0 for the main L0 and when SSI is disabled.

§occ_read_set: Option<Arc<Mutex<OccReadSet>>>

Optimistic-concurrency read-set (SSI). Some on a read-write transaction’s private L0 when SSI tracking is active; the read path records observed ids here and commit checks them for antidependencies. None for the main L0 and read-only / SSI-disabled paths.

§plugin_registry: Option<Arc<PluginRegistry>>

Optional plugin registry for registry-dispatched CRDT merges at commit-time property merge (merge_crdt_properties).

Behavior-preserving when absent: falls back to native uni_crdt::Crdt::try_merge bit-for-bit when no provider is registered. Stamped onto every live buffer by the owning L0Manager. Not part of buffer identity — cloned buffers (forked ASSUME/ABDUCE L0s) inherit it, but it is never serialized or flushed.

Implementations§

Source§

impl L0Buffer

Source

pub fn set_vertex_labels(&mut self, vid: Vid, labels: &[String])

Replaces a vertex’s FULL label set — the semantics of SET n:Label / REMOVE n:Label, which resolve the new complete set before writing.

Unlike add_vertex_labels (append), this clears the vid’s existing labels from the reverse index, sets the new set, and re-indexes — so a removal actually removes. It marks the vid in vertex_label_overwrites so merge REPLACES (not appends) these labels at commit and WriteSet::from_l0 treats the change as a conflictable write. Increments mutation_count (a label change is a real mutation; its sibling remove_vertex_label already does so).

Source

pub fn size_bytes(&self) -> usize

Returns an estimate of the buffer size in bytes. Includes all fields for accurate memory accounting.

Source

pub fn new(start_version: u64, wal: Option<Arc<WriteAheadLog>>) -> Self

Source

pub fn set_plugin_registry(&mut self, registry: Arc<PluginRegistry>)

Install the plugin registry used for registry-dispatched CRDT merges.

Stamped by the owning L0Manager onto every buffer it mints so the commit-time merge (merge_crdt_properties) can route custom CRDT kinds through a registered provider. Absent registry preserves native uni_crdt::Crdt::try_merge behavior.

Source

pub fn insert_vertex(&mut self, vid: Vid, properties: Properties)

Source

pub fn insert_vertex_with_labels( &mut self, vid: Vid, properties: Properties, labels: &[String], )

Insert a vertex with associated labels.

Source

pub fn insert_vertex_partial_full( &mut self, vid: Vid, props: Properties, touched_keys: HashSet<String>, labels: &[String], )

Insert a vertex’s FULL property row, tagging touched_keys so the flush emits exactly those columns via Lance MergeInsertBuilder instead of a full-row Append.

props MUST be the fully-merged property map (storage union in-flight L0 union the new touched values, per PropertyManager::get_all_vertex_props_with_ctx). The caller is responsible for the union; L0 here just stores it so scans see the complete row without per-key reconciliation.

touched_keys lists the property keys this SET statement actually assigned — the union of those across all coalesced SetItems on this VID. Lance MergeInsert sends a source batch with _vid, _deleted, _version, _updated_at, and those touched columns; non-touched columns retain their pre-merge values on the Lance side, skipping the wide-row write.

A subsequent full-row insert_vertex_with_labels or delete_vertex on the same VID clears the partial-keys entry so partial state never outlives a stronger write.

Source

pub fn insert_vertex_partial( &mut self, vid: Vid, touched: Properties, labels: &[String], )

Legacy partial-only variant used by some uni-store paths. Kept for source-compatibility but new uni-query callers should use insert_vertex_partial_full to preserve scan-side L0 visibility.

Source

pub fn add_vertex_labels(&mut self, vid: Vid, labels: &[String])

Add labels to an existing vertex.

Source

pub fn remove_vertex_label(&mut self, vid: Vid, label: &str) -> bool

Remove a label from an existing vertex. Returns true if the label was found and removed, false otherwise.

Source

pub fn set_edge_type(&mut self, eid: Eid, edge_type: String)

Set the type for an edge.

Source

pub fn delete_vertex(&mut self, vid: Vid) -> Result<()>

Source

pub fn insert_edge( &mut self, src_vid: Vid, dst_vid: Vid, edge_type: u32, eid: Eid, properties: Properties, edge_type_name: Option<String>, ) -> Result<()>

Source

pub fn insert_edge_partial_full( &mut self, src_vid: Vid, dst_vid: Vid, edge_type: u32, eid: Eid, properties: Properties, edge_type_name: Option<String>, touched_keys: HashSet<String>, ) -> Result<()>

Insert an edge’s FULL property row plus a touched-keys hint so the flush emits only those schema columns via Lance MergeInsert on the per-edge-type delta tables. Edge analog of insert_vertex_partial_full (Round 12 §A).

Source

pub fn delete_edge( &mut self, eid: Eid, src_vid: Vid, dst_vid: Vid, edge_type: u32, ) -> Result<()>

Source

pub fn get_neighbors( &self, vid: Vid, edge_type: u32, direction: Direction, ) -> Vec<(Vid, Eid, u64)>

Returns neighbors in the specified direction. O(degree) complexity - iterates only edges connected to the vertex.

Source

pub fn is_tombstoned(&self, eid: Eid) -> bool

Source

pub fn vids_for_label(&self, label_name: &str) -> Vec<Vid>

Returns all VIDs in vertex_labels that match the given label name. O(1) lookup via the reverse label index.

Source

pub fn all_vertex_vids(&self) -> Vec<Vid>

Returns all vertex VIDs in the L0 buffer.

Used for schemaless scanning (MATCH (n) without label).

Source

pub fn vids_for_labels(&self, label_names: &[&str]) -> Vec<Vid>

Returns all VIDs in vertex_labels that match any of the given label names. Uses the reverse label index — O(sum of matching set sizes).

Source

pub fn vids_with_all_labels(&self, label_names: &[&str]) -> Vec<Vid>

Returns all VIDs that have ALL specified labels. Uses the reverse label index — intersects the per-label sets.

Source

pub fn get_vertex_labels(&self, vid: Vid) -> Option<&[String]>

Gets the labels for a VID.

Source

pub fn get_edge_type(&self, eid: Eid) -> Option<&str>

Gets the edge type for an EID.

Source

pub fn eids_for_type(&self, type_name: &str) -> Vec<Eid>

Returns all EIDs in edge_types that match the given type name. Used for L0 overlay during schemaless edge scanning.

Source

pub fn all_edge_eids(&self) -> Vec<Eid>

Returns all edge EIDs in the L0 buffer (non-tombstoned).

Used for schemaless scanning (MATCH ()-[r]->()) without type.

Source

pub fn get_edge_endpoints(&self, eid: Eid) -> Option<(Vid, Vid)>

Returns edge endpoint data (src_vid, dst_vid) for an EID.

Source

pub fn get_edge_endpoint_full(&self, eid: Eid) -> Option<(Vid, Vid, u32)>

Returns full edge endpoint data (src_vid, dst_vid, edge_type_id) for an EID.

Source

pub fn insert_constraint_key(&mut self, key: Vec<u8>, vid: Vid)

Insert a constraint key into the index for O(1) duplicate detection.

Source

pub fn has_constraint_key(&self, key: &[u8], exclude_vid: Vid) -> bool

Check if a constraint key exists in the index, excluding a specific VID. Returns true if the key exists and is owned by a different vertex.

Source

pub fn insert_edge_constraint_key(&mut self, key: Vec<u8>, eid: Eid)

Insert an edge unique-constraint key into the index (edge analogue of insert_constraint_key).

Source

pub fn has_edge_constraint_key(&self, key: &[u8], exclude_eid: Eid) -> bool

Check if an edge unique-constraint key exists, owned by an edge other than exclude_eid. Edge analogue of has_constraint_key.

Source

pub fn insert_merge_guard_key(&mut self, key: Vec<u8>, vid: Vid)

Register a MERGE-create’s key into the implicit phantom guard.

Source

pub fn has_merge_guard_key(&self, key: &[u8], exclude_vid: Vid) -> bool

Check if a MERGE-guard key exists, owned by a different vertex than exclude_vid — i.e. a concurrent MERGE already created this key.

Source

pub fn validate_merge_edge_endpoints(&self, other: &L0Buffer) -> Result<()>

Validate that merging other into self will not bail on a tombstoned edge endpoint (issue #77), without mutating either buffer.

Mirrors the endpoint-liveness guard in apply_edge_insertion against the tombstone state Self::merge produces: other’s vertex deletions are applied and its vertex inserts clear their own tombstone, so an inserted edge bails iff an endpoint is tombstoned in self or other and is not (re-)inserted by other.

Run this under flush_lock before the durable WAL flush so an offending commit is rejected up front. After the flush the transaction is durable, and a merge bail would leave a ghost/partial commit whose WAL replay re-bails — rendering the database unopenable.

§Errors

Returns an error naming the offending edge and endpoint when the merge would bail.

Source

pub fn merge(&mut self, other: &L0Buffer) -> Result<()>

Source

pub fn merge_take(&mut self, other: &mut L0Buffer) -> Result<()>

Commit-path variant of merge that consumes other’s vertex/edge property maps instead of deep-cloning every row.

Everything else in other (endpoints, tombstones, versions, labels) is left intact — commit_transaction_l0 still reads those after the merge. The caller must not rely on other.vertex_properties / other.edge_properties afterwards, which is safe on the commit path because committing consumes the transaction.

Source

pub fn replay_mutations(&mut self, mutations: Vec<Mutation>) -> Result<()>

Replay mutations from WAL without re-logging them. Used during startup recovery to restore L0 state from persisted WAL. Uses CRDT merge semantics to ensure recovered state matches pre-crash state.

Trait Implementations§

Source§

impl Clone for L0Buffer

Source§

fn clone(&self) -> Self

Clone the L0 buffer for fork/restore (ASSUME/ABDUCE).

The cloned buffer does NOT share the WAL reference — forked L0s are ephemeral and should not write to the WAL.

1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for L0Buffer

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<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> 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> Conv for T

Source§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
Source§

impl<T> FmtForward for T

Source§

fn fmt_binary(self) -> FmtBinary<Self>
where Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
Source§

fn fmt_display(self) -> FmtDisplay<Self>
where Self: Display,

Causes self to use its Display implementation when Debug-formatted.
Source§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where Self: LowerExp,

Causes self to use its LowerExp implementation when Debug-formatted.
Source§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where Self: LowerHex,

Causes self to use its LowerHex implementation when Debug-formatted.
Source§

fn fmt_octal(self) -> FmtOctal<Self>
where Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
Source§

fn fmt_pointer(self) -> FmtPointer<Self>
where Self: Pointer,

Causes self to use its Pointer implementation when Debug-formatted.
Source§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where Self: UpperExp,

Causes self to use its UpperExp implementation when Debug-formatted.
Source§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where Self: UpperHex,

Causes self to use its UpperHex implementation when Debug-formatted.
Source§

fn fmt_list(self) -> FmtList<Self>
where &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

Source§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
Source§

impl<T> MaybeSend for T
where T: Send,

Source§

impl<T> MaybeSend for T
where T: Send,

Source§

impl<T> Pipe for T
where T: ?Sized,

Source§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
Source§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
Source§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
Source§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
Source§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe function.
Source§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
Source§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R, ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
Source§

impl<T> PluginState for T
where T: Send + Sync + 'static,

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> Tap for T

Source§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
Source§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
Source§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
Source§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
Source§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
Source§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
Source§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
Source§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
Source§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
Source§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release builds.
Source§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release builds.
Source§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
Source§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
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> TryConv for T

Source§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. 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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

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