pub struct Contradiction {
pub id: ContradictionId,
pub left_ref: String,
pub right_ref: String,
pub contradiction_type: ContradictionType,
pub status: ContradictionStatus,
pub interpretation: Option<String>,
pub created_at: SystemTime,
pub updated_at: SystemTime,
}Expand description
First-class contradiction record.
Fields§
§id: ContradictionIdStable contradiction ID.
left_ref: StringLeft memory/principle/reference.
right_ref: StringRight memory/principle/reference.
contradiction_type: ContradictionTypeConflict kind.
status: ContradictionStatusCurrent lifecycle status.
interpretation: Option<String>Interpretation or resolution note.
created_at: SystemTimeCreation timestamp.
updated_at: SystemTimeLast update timestamp.
Implementations§
Source§impl Contradiction
impl Contradiction
Sourcepub fn new(
id: ContradictionId,
left_ref: impl Into<String>,
right_ref: impl Into<String>,
contradiction_type: ContradictionType,
created_at: SystemTime,
) -> ContradictionResult<Self>
pub fn new( id: ContradictionId, left_ref: impl Into<String>, right_ref: impl Into<String>, contradiction_type: ContradictionType, created_at: SystemTime, ) -> ContradictionResult<Self>
Construct a new unresolved contradiction.
Sourcepub fn interpret(
&mut self,
interpretation: impl Into<String>,
updated_at: SystemTime,
) -> ContradictionResult<()>
pub fn interpret( &mut self, interpretation: impl Into<String>, updated_at: SystemTime, ) -> ContradictionResult<()>
Mark this contradiction interpreted but still open.
Sourcepub fn resolve(
&mut self,
resolution: impl Into<String>,
updated_at: SystemTime,
) -> ContradictionResult<()>
pub fn resolve( &mut self, resolution: impl Into<String>, updated_at: SystemTime, ) -> ContradictionResult<()>
Mark this contradiction resolved.
Trait Implementations§
Source§impl Clone for Contradiction
impl Clone for Contradiction
Source§fn clone(&self) -> Contradiction
fn clone(&self) -> Contradiction
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 Contradiction
impl Debug for Contradiction
Source§impl PartialEq for Contradiction
impl PartialEq for Contradiction
Source§fn eq(&self, other: &Contradiction) -> bool
fn eq(&self, other: &Contradiction) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for Contradiction
impl StructuralPartialEq for Contradiction
Auto Trait Implementations§
impl Freeze for Contradiction
impl RefUnwindSafe for Contradiction
impl Send for Contradiction
impl Sync for Contradiction
impl Unpin for Contradiction
impl UnsafeUnpin for Contradiction
impl UnwindSafe for Contradiction
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.