pub enum SpecType {
Int,
Float,
Bool,
Str,
Record {
fields: Vec<(String, SpecType)>,
},
List {
element: Box<SpecType>,
},
Named {
name: String,
},
}Variants§
Int
Float
Bool
Str
Record
Record type with named fields (#208). Quantifying over a
record-shaped binding lets specs reference structured agent
state without flattening into per-field scalar bindings.
Fields are stored in declaration order; the gate evaluator
resolves expr.field against Value::Record’s IndexMap,
which preserves insertion order.
List
List of an element type (#208). Quantifying over a list lets
specs reason about agent collections — outstanding orders,
active charging sessions, message queues — via length,
head, tail, and indexed access (xs[i]).
Named
Named user type (#208 slice 3). Refers to a user-defined ADT
from the host program (e.g. Message, Order). The gate
evaluator inspects the value’s variant tag at match time;
no compile-time variant table is needed for the gate path.
The random-input prover (check_spec) can’t sample arbitrary
user types and fails out — those tests should provide
concrete bindings instead.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SpecType
impl<'de> Deserialize<'de> for SpecType
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>,
impl StructuralPartialEq for SpecType
Auto Trait Implementations§
impl Freeze for SpecType
impl RefUnwindSafe for SpecType
impl Send for SpecType
impl Sync for SpecType
impl Unpin for SpecType
impl UnsafeUnpin for SpecType
impl UnwindSafe for SpecType
Blanket Implementations§
impl<T> Allocation for T
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
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> 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> ⓘ
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> ⓘ
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