Struct Context

Source
pub struct Context<'p, E: 'p + Environment> { /* private fields */ }
Expand description

Evaluation context. Maps each variable to its sort.

Implementations§

Source§

impl<'p, E: 'p + Environment> Context<'p, E>

Source

pub fn new() -> Context<'p, E>

Create a new empty context.

Source

pub fn from(parent: &'p Context<'p, E>) -> Context<'p, E>

Source

pub fn find(&self, id: &E::Ident) -> Option<(usize, &GroundSort<E::Sort>)>

Source

pub fn sort(&self, x: usize) -> &GroundSort<E::Sort>

Get the sort of the given variable (identified with its index). Panics if the variable is not defined in the context.

Auto Trait Implementations§

§

impl<'p, E> Freeze for Context<'p, E>

§

impl<'p, E> RefUnwindSafe for Context<'p, E>

§

impl<'p, E> Send for Context<'p, E>
where <E as Environment>::Ident: Send + Sync, <E as Environment>::Sort: Send + Sync,

§

impl<'p, E> Sync for Context<'p, E>
where <E as Environment>::Ident: Sync, <E as Environment>::Sort: Sync,

§

impl<'p, E> Unpin for Context<'p, E>
where <E as Environment>::Ident: Unpin, <E as Environment>::Sort: Unpin,

§

impl<'p, E> UnwindSafe for Context<'p, E>

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.