pub struct ContradictionRegistry { /* private fields */ }Expand description
Pure memory-layer CRUD registry for contradiction objects.
Persistence can wrap this once cortex-store exposes a contradiction repo;
the status semantics are intentionally independent of SQLite.
Implementations§
Source§impl ContradictionRegistry
impl ContradictionRegistry
Sourcepub fn create(&mut self, contradiction: Contradiction) -> Option<Contradiction>
pub fn create(&mut self, contradiction: Contradiction) -> Option<Contradiction>
Create or replace a contradiction by ID.
Sourcepub fn get(&self, id: &ContradictionId) -> Option<&Contradiction>
pub fn get(&self, id: &ContradictionId) -> Option<&Contradiction>
Read a contradiction by ID.
Sourcepub fn update<F>(
&mut self,
id: &ContradictionId,
update: F,
) -> ContradictionResult<()>
pub fn update<F>( &mut self, id: &ContradictionId, update: F, ) -> ContradictionResult<()>
Update an existing contradiction in place.
Sourcepub fn delete(&mut self, id: &ContradictionId) -> Option<Contradiction>
pub fn delete(&mut self, id: &ContradictionId) -> Option<Contradiction>
Delete a contradiction by ID.
Sourcepub fn list(&self) -> Vec<&Contradiction>
pub fn list(&self) -> Vec<&Contradiction>
List all records in deterministic ID order.
Sourcepub fn list_unresolved(&self) -> Vec<&Contradiction>
pub fn list_unresolved(&self) -> Vec<&Contradiction>
List unresolved records only.
Sourcepub fn list_open(&self) -> Vec<&Contradiction>
pub fn list_open(&self) -> Vec<&Contradiction>
List records that remain open for canonicality/retrieval purposes.
Sourcepub fn list_resolved(&self) -> Vec<&Contradiction>
pub fn list_resolved(&self) -> Vec<&Contradiction>
List resolved records only.
Trait Implementations§
Source§impl Clone for ContradictionRegistry
impl Clone for ContradictionRegistry
Source§fn clone(&self) -> ContradictionRegistry
fn clone(&self) -> ContradictionRegistry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ContradictionRegistry
impl Debug for ContradictionRegistry
Source§impl Default for ContradictionRegistry
impl Default for ContradictionRegistry
Source§fn default() -> ContradictionRegistry
fn default() -> ContradictionRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ContradictionRegistry
impl RefUnwindSafe for ContradictionRegistry
impl Send for ContradictionRegistry
impl Sync for ContradictionRegistry
impl Unpin for ContradictionRegistry
impl UnsafeUnpin for ContradictionRegistry
impl UnwindSafe for ContradictionRegistry
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