Struct Context

Source
pub struct Context<T>
where T: Timestamp + Lattice,
{ pub rules: HashMap<Aid, Rule>, pub underconstrained: HashSet<Aid>, pub internal: Domain<T>, }
Expand description

Implementation context.

Fields§

§rules: HashMap<Aid, Rule>

Representation of named rules.

§underconstrained: HashSet<Aid>

Set of rules known to be underconstrained.

§internal: Domain<T>

Internal domain of command sequence numbers.

Trait Implementations§

Source§

impl<T> ImplContext<T> for Context<T>
where T: Timestamp + Lattice,

Source§

fn rule(&self, name: &str) -> Option<&Rule>

Returns the definition for the rule of the given name.
Source§

fn global_arrangement(&mut self, name: &str) -> Option<&mut RelationHandle<T>>

Returns a mutable reference to a (non-base) relation, if one is registered under the given name.
Source§

fn has_attribute(&self, name: &str) -> bool

Checks whether an attribute of that name exists.
Source§

fn forward_count( &mut self, name: &str, ) -> Option<&mut TraceKeyHandle<Value, T, isize>>

Retrieves the forward count trace for the specified aid.
Source§

fn forward_propose( &mut self, name: &str, ) -> Option<&mut TraceValHandle<Value, Value, T, isize>>

Retrieves the forward propose trace for the specified aid.
Source§

fn forward_validate( &mut self, name: &str, ) -> Option<&mut TraceKeyHandle<(Value, Value), T, isize>>

Retrieves the forward validate trace for the specified aid.
Source§

fn reverse_count( &mut self, name: &str, ) -> Option<&mut TraceKeyHandle<Value, T, isize>>

Retrieves the reverse count trace for the specified aid.
Source§

fn reverse_propose( &mut self, name: &str, ) -> Option<&mut TraceValHandle<Value, Value, T, isize>>

Retrieves the reverse propose trace for the specified aid.
Source§

fn reverse_validate( &mut self, name: &str, ) -> Option<&mut TraceKeyHandle<(Value, Value), T, isize>>

Retrieves the reverse validate trace for the specified aid.
Source§

fn is_underconstrained(&self, _name: &str) -> bool

Returns the current opinion as to whether this rule is underconstrained. Underconstrained rules cannot be safely materialized and re-used on their own (i.e. without more specific constraints).

Auto Trait Implementations§

§

impl<T> Freeze for Context<T>
where T: Freeze,

§

impl<T> !RefUnwindSafe for Context<T>

§

impl<T> !Send for Context<T>

§

impl<T> !Sync for Context<T>

§

impl<T> Unpin for Context<T>
where T: Unpin,

§

impl<T> !UnwindSafe for Context<T>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.