pub struct TopologicalDeltaRing<const CAP: usize = 256> { /* private fields */ }Expand description
Fixed-capacity, zero-heap delta ring buffer for live topological mutations across harboured graphs.
Implementations§
Source§impl<const CAP: usize> TopologicalDeltaRing<CAP>
impl<const CAP: usize> TopologicalDeltaRing<CAP>
pub const fn new() -> Self
pub const fn len(&self) -> usize
pub const fn is_empty(&self) -> bool
pub const fn capacity(&self) -> usize
pub fn clear(&mut self)
pub fn entries(&self) -> &[TopologicalDeltaEntry]
Sourcepub fn push_entry(
&mut self,
entry: TopologicalDeltaEntry,
) -> Result<u16, TopologyError>
pub fn push_entry( &mut self, entry: TopologicalDeltaEntry, ) -> Result<u16, TopologyError>
Append a delta entry, assigning the next monotonic seq_no.
Sourcepub fn insert_edge(
&mut self,
graph_slot: u8,
source_vertex: u32,
target_vertex: u32,
edge_anchor_idx: u32,
) -> Result<u16, TopologyError>
pub fn insert_edge( &mut self, graph_slot: u8, source_vertex: u32, target_vertex: u32, edge_anchor_idx: u32, ) -> Result<u16, TopologyError>
Record an edge insertion (source_vertex -> target_vertex) in graph_slot.
Sourcepub fn tombstone_edge(
&mut self,
graph_slot: u8,
source_vertex: u32,
target_vertex: u32,
) -> Result<u16, TopologyError>
pub fn tombstone_edge( &mut self, graph_slot: u8, source_vertex: u32, target_vertex: u32, ) -> Result<u16, TopologyError>
Record an edge deletion (source_vertex -> target_vertex) in graph_slot.
Sourcepub fn reify_edge(
&mut self,
graph_slot: u8,
source_vertex: u32,
target_vertex: u32,
edge_anchor_idx: u32,
) -> Result<u16, TopologyError>
pub fn reify_edge( &mut self, graph_slot: u8, source_vertex: u32, target_vertex: u32, edge_anchor_idx: u32, ) -> Result<u16, TopologyError>
Record a reified hyperedge insertion (source_vertex -> target_vertex) in graph_slot.
Sourcepub fn bind_anchor(
&mut self,
graph_slot: u8,
vertex: u32,
cell_index: u32,
domain: AnchorDomain,
) -> Result<u16, TopologyError>
pub fn bind_anchor( &mut self, graph_slot: u8, vertex: u32, cell_index: u32, domain: AnchorDomain, ) -> Result<u16, TopologyError>
Bind vertex in graph_slot to (domain, cell_index) in the host Geometry.
Sourcepub fn dirty_slot_mask(&self) -> u64
pub fn dirty_slot_mask(&self) -> u64
64-bit bitmask of harboured graph slots (0..64) modified in this ring.
Trait Implementations§
Source§impl<const CAP: usize> Clone for TopologicalDeltaRing<CAP>
impl<const CAP: usize> Clone for TopologicalDeltaRing<CAP>
impl<const CAP: usize> Copy for TopologicalDeltaRing<CAP>
Source§impl<const CAP: usize> Debug for TopologicalDeltaRing<CAP>
impl<const CAP: usize> Debug for TopologicalDeltaRing<CAP>
Auto Trait Implementations§
impl<const CAP: usize> Freeze for TopologicalDeltaRing<CAP>
impl<const CAP: usize> RefUnwindSafe for TopologicalDeltaRing<CAP>
impl<const CAP: usize> Send for TopologicalDeltaRing<CAP>
impl<const CAP: usize> Sync for TopologicalDeltaRing<CAP>
impl<const CAP: usize> Unpin for TopologicalDeltaRing<CAP>
impl<const CAP: usize> UnsafeUnpin for TopologicalDeltaRing<CAP>
impl<const CAP: usize> UnwindSafe for TopologicalDeltaRing<CAP>
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.