Struct ExplicitClose

Source
pub struct ExplicitClose<LABEL> { /* private fields */ }
Expand description

Critical-edge based Completeness implementation.

Unlike [ImplicitClose], this implementation shifts responsibility of closing edges to the type checker writer. I.e., they have to insert sg.close(scope, label) statements at the appropriate positions in the code.

Returns EdgeClosedError when an edge is added to a scope in which the label is already closed (by an explicit close of the type checker writer).

Returns Delay when edges are retrieved (e.g. during query resolution) for an edge that is not yet closed.

Trait Implementations§

Source§

impl<LABEL: Hash + Eq + Label, DATA> Completeness<LABEL, DATA> for ExplicitClose<LABEL>

Source§

type NewEdgeResult = Result<(), EdgeClosedError<LABEL>>

Source§

type GetEdgesResult<'rslv> = Result<Vec<Scope>, Delay<LABEL>> where Self: 'rslv, LABEL: 'rslv, DATA: 'rslv

Source§

fn cmpl_new_scope(&self, _: &InnerScopeGraph<'_, LABEL, DATA>, _: Scope)

Source§

fn cmpl_new_complete_scope( &self, _: &InnerScopeGraph<'_, LABEL, DATA>, _: Scope, )

Should initialize a scope without possibility to extend it with edges
Source§

fn cmpl_new_edge( &self, inner_scope_graph: &InnerScopeGraph<'_, LABEL, DATA>, src: Scope, lbl: LABEL, dst: Scope, ) -> Self::NewEdgeResult

Source§

fn cmpl_get_edges<'rslv>( &self, inner_scope_graph: &InnerScopeGraph<'_, LABEL, DATA>, src: Scope, lbl: LABEL, ) -> Self::GetEdgesResult<'rslv>
where LABEL: 'rslv, DATA: 'rslv,

Source§

impl<LABEL: Hash + Eq + Label, DATA> CriticalEdgeBasedCompleteness<LABEL, DATA> for ExplicitClose<LABEL>

Source§

fn init_scope_with(&self, open_labels: HashSet<LABEL>)

Source§

impl<LABEL: Debug> Debug for ExplicitClose<LABEL>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<LABEL> Default for ExplicitClose<LABEL>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<LABEL> !Freeze for ExplicitClose<LABEL>

§

impl<LABEL> !RefUnwindSafe for ExplicitClose<LABEL>

§

impl<LABEL> Send for ExplicitClose<LABEL>
where LABEL: Send,

§

impl<LABEL> !Sync for ExplicitClose<LABEL>

§

impl<LABEL> Unpin for ExplicitClose<LABEL>
where LABEL: Unpin,

§

impl<LABEL> UnwindSafe for ExplicitClose<LABEL>
where LABEL: UnwindSafe,

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.