pub struct InvariantContract {
pub name: String,
pub record_type: String,
pub schema: Value,
pub tolerances: Vec<ToleranceContract>,
pub confirms: Option<String>,
}Expand description
One invariant declaration.
Fields§
§name: StringInvariant name.
record_type: StringThe DECLARED type name of the current-state record (invariant serving: type Board → "Board").
Carried beside the schema, not derived from it: the engine stamps this on every durable invariant current-state record as provenance, so a reader can tell which declaration a stored value was written under. A schema is structural and two different declarations can share one.
schema: ValueThe current-state record schema.
tolerances: Vec<ToleranceContract>The declared tolerance forms, in declaration order (never empty for a checked document — C3).
confirms: Option<String>The route whose firing confirms the invariant, when declared.
Trait Implementations§
Source§impl Clone for InvariantContract
impl Clone for InvariantContract
Source§fn clone(&self) -> InvariantContract
fn clone(&self) -> InvariantContract
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 InvariantContract
impl Debug for InvariantContract
Source§impl<'de> Deserialize<'de> for InvariantContract
impl<'de> Deserialize<'de> for InvariantContract
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for InvariantContract
Source§impl PartialEq for InvariantContract
impl PartialEq for InvariantContract
Source§impl Serialize for InvariantContract
impl Serialize for InvariantContract
impl StructuralPartialEq for InvariantContract
Auto Trait Implementations§
impl Freeze for InvariantContract
impl RefUnwindSafe for InvariantContract
impl Send for InvariantContract
impl Sync for InvariantContract
impl Unpin for InvariantContract
impl UnsafeUnpin for InvariantContract
impl UnwindSafe for InvariantContract
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
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> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.