pub trait DeferredSet:
Send
+ Sync
+ Debug
+ Any {
// Required methods
fn kind(&self) -> DeferredKind;
fn elements(&self, ctx: Ctx) -> Result<Vec<Value>>;
fn member(&self, elem: &Value, ctx: Ctx) -> Option<Result<bool>>;
// Provided methods
fn key(&self) -> Vec<Value> { ... }
fn as_any(&self) -> Option<&dyn Any> { ... }
}Expand description
The source of an evaluator-driven lazy set ({x \in S : P} or {e : x \in S}).
dive-value stores and prints such sets but cannot evaluate them: dive-eval
implements this trait.
Required Methods§
Sourcefn kind(&self) -> DeferredKind
fn kind(&self) -> DeferredKind
Which construct the set is.
Provided Methods§
Sourcefn key(&self) -> Vec<Value>
fn key(&self) -> Vec<Value>
A stable description of the definition (for example the bound set and the values the predicate closes over). Two unenumerable deferred sets of the same kind are equal, and ordered, by their keys; enumerable ones by their elements. The default, an empty key, makes all unenumerable sets of one kind equal.
Sourcefn as_any(&self) -> Option<&dyn Any>
fn as_any(&self) -> Option<&dyn Any>
The source as std::any::Any, so that its owner can recover its
own type (the evaluator reproduces TLC’s unnormalized enumeration of
its lazy sets). The default, None, hides it.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".