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>
impl<LABEL: Hash + Eq + Label, DATA> Completeness<LABEL, DATA> for ExplicitClose<LABEL>
type NewEdgeResult = Result<(), EdgeClosedError<LABEL>>
type GetEdgesResult<'rslv> = Result<Vec<Scope>, Delay<LABEL>> where Self: 'rslv, LABEL: 'rslv, DATA: 'rslv
fn cmpl_new_scope(&self, _: &InnerScopeGraph<'_, LABEL, DATA>, _: Scope)
Source§fn cmpl_new_complete_scope(
&self,
_: &InnerScopeGraph<'_, LABEL, DATA>,
_: Scope,
)
fn cmpl_new_complete_scope( &self, _: &InnerScopeGraph<'_, LABEL, DATA>, _: Scope, )
Should initialize a scope without possibility to extend it with edges
fn cmpl_new_edge( &self, inner_scope_graph: &InnerScopeGraph<'_, LABEL, DATA>, src: Scope, lbl: LABEL, dst: Scope, ) -> Self::NewEdgeResult
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>
impl<LABEL: Hash + Eq + Label, DATA> CriticalEdgeBasedCompleteness<LABEL, DATA> for ExplicitClose<LABEL>
fn init_scope_with(&self, open_labels: HashSet<LABEL>)
Source§impl<LABEL: Debug> Debug for ExplicitClose<LABEL>
impl<LABEL: Debug> Debug for ExplicitClose<LABEL>
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> 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
Mutably borrows from an owned value. Read more