pub struct Query<'storage, 'sg, 'rslv, LABEL, DATA, CMPL, PWF, DWF, LO, DEq> { /* private fields */ }Implementations§
Source§impl<'sg, 'storage, 'rslv, LABEL, DATA, CMPL, PWF, DWF, LO, DEq> Query<'sg, 'storage, 'rslv, LABEL, DATA, CMPL, PWF, DWF, LO, DEq>
impl<'sg, 'storage, 'rslv, LABEL, DATA, CMPL, PWF, DWF, LO, DEq> Query<'sg, 'storage, 'rslv, LABEL, DATA, CMPL, PWF, DWF, LO, DEq>
pub fn with_path_wellformedness<NPWF>(
self,
new_path_wellformedness: NPWF,
) -> Query<'sg, 'storage, 'rslv, LABEL, DATA, CMPL, NPWF, DWF, LO, DEq>where
NPWF: for<'a> RegexMatcher<&'a LABEL> + 'rslv,
pub fn with_data_wellformedness<NDWF>(
self,
new_data_wellformedness: NDWF,
) -> Query<'sg, 'storage, 'rslv, LABEL, DATA, CMPL, PWF, NDWF, LO, DEq>where
NDWF: DataWellformedness<DATA> + 'rslv,
pub fn with_label_order<NLO>(
self,
new_label_order: NLO,
) -> Query<'sg, 'storage, 'rslv, LABEL, DATA, CMPL, PWF, DWF, NLO, DEq>where
NLO: LabelOrder<LABEL> + 'rslv,
pub fn with_data_equivalence<NDEq>(
self,
new_data_equivalence: NDEq,
) -> Query<'sg, 'storage, 'rslv, LABEL, DATA, CMPL, PWF, DWF, LO, NDEq>where
NDEq: DataEquiv<DATA> + 'rslv,
Trait Implementations§
Source§impl<'sg: 'rslv, 'storage, 'rslv, LABEL, DATA, CMPL, PWF, DWF, LO, DEq> Resolve<'sg, 'rslv> for Query<'storage, 'sg, 'rslv, LABEL, DATA, CMPL, PWF, DWF, LO, DEq>where
LABEL: Label + Copy + Debug + Hash + Eq,
DATA: Debug,
CMPL: Completeness<LABEL, DATA>,
CMPL::GetEdgesResult<'rslv>: ScopeContainer<LABEL>,
<CMPL::GetEdgesResult<'rslv> as ScopeContainer<LABEL>>::PathContainer: PathContainer<'sg, 'rslv, LABEL, DATA>,
<<CMPL::GetEdgesResult<'rslv> as ScopeContainer<LABEL>>::PathContainer as PathContainer<'sg, 'rslv, LABEL, DATA>>::EnvContainer: EnvContainer<'sg, 'rslv, LABEL, DATA> + Debug,
PWF: for<'a> RegexMatcher<&'a LABEL> + 'rslv,
DWF: DataWellformedness<DATA> + 'rslv,
LO: LabelOrder<LABEL> + 'rslv,
DEq: DataEquiv<DATA> + 'rslv,
ResolvedPath<'sg, LABEL, DATA>: Hash + Eq,
Path<LABEL>: Clone,
'storage: 'sg,
impl<'sg: 'rslv, 'storage, 'rslv, LABEL, DATA, CMPL, PWF, DWF, LO, DEq> Resolve<'sg, 'rslv> for Query<'storage, 'sg, 'rslv, LABEL, DATA, CMPL, PWF, DWF, LO, DEq>where
LABEL: Label + Copy + Debug + Hash + Eq,
DATA: Debug,
CMPL: Completeness<LABEL, DATA>,
CMPL::GetEdgesResult<'rslv>: ScopeContainer<LABEL>,
<CMPL::GetEdgesResult<'rslv> as ScopeContainer<LABEL>>::PathContainer: PathContainer<'sg, 'rslv, LABEL, DATA>,
<<CMPL::GetEdgesResult<'rslv> as ScopeContainer<LABEL>>::PathContainer as PathContainer<'sg, 'rslv, LABEL, DATA>>::EnvContainer: EnvContainer<'sg, 'rslv, LABEL, DATA> + Debug,
PWF: for<'a> RegexMatcher<&'a LABEL> + 'rslv,
DWF: DataWellformedness<DATA> + 'rslv,
LO: LabelOrder<LABEL> + 'rslv,
DEq: DataEquiv<DATA> + 'rslv,
ResolvedPath<'sg, LABEL, DATA>: Hash + Eq,
Path<LABEL>: Clone,
'storage: 'sg,
Source§fn resolve(&'rslv self, scope: Scope) -> Self::EnvContainer
fn resolve(&'rslv self, scope: Scope) -> Self::EnvContainer
Entry point of lookup-based query resolution. Performs a traversal of the scope graph that results in an environment containing all declarations matching a reference.
Type parameters:
LABEL: labels in the scope graph.DATA: Data in the scope graph.CMPL: the completeness approach (determined by the scope graph). Should be an instance ofCompleteness. This guarantees that the query resolution result will remain valid, even in the presence of future additions to the scope graph.ENVC: TheEnvContainer(determined byCMPL) used to process environments throughout the resolution process..PWF: regular expression matcher that indicates which paths are valid. The labels of all paths in the environment will match the regular expression that this matcher is derived from.DWF: Unary predicate over data that selects valid declarations.LO: Label order: the order on labels that indicates which declarations are preferred over others.DEq: Equivalence relation on data that determines which declarations can shadow each other.
Parameters:
scope: the scope graph in which to start name resolution
type EnvContainer = <<<CMPL as Completeness<LABEL, DATA>>::GetEdgesResult<'rslv> as ScopeContainer<LABEL>>::PathContainer as PathContainer<'sg, 'rslv, LABEL, DATA>>::EnvContainer where Self: 'rslv, 'sg: 'rslv
Auto Trait Implementations§
impl<'storage, 'sg, 'rslv, LABEL, DATA, CMPL, PWF, DWF, LO, DEq> Freeze for Query<'storage, 'sg, 'rslv, LABEL, DATA, CMPL, PWF, DWF, LO, DEq>
impl<'storage, 'sg, 'rslv, LABEL, DATA, CMPL, PWF, DWF, LO, DEq> !RefUnwindSafe for Query<'storage, 'sg, 'rslv, LABEL, DATA, CMPL, PWF, DWF, LO, DEq>
impl<'storage, 'sg, 'rslv, LABEL, DATA, CMPL, PWF, DWF, LO, DEq> !Send for Query<'storage, 'sg, 'rslv, LABEL, DATA, CMPL, PWF, DWF, LO, DEq>
impl<'storage, 'sg, 'rslv, LABEL, DATA, CMPL, PWF, DWF, LO, DEq> !Sync for Query<'storage, 'sg, 'rslv, LABEL, DATA, CMPL, PWF, DWF, LO, DEq>
impl<'storage, 'sg, 'rslv, LABEL, DATA, CMPL, PWF, DWF, LO, DEq> Unpin for Query<'storage, 'sg, 'rslv, LABEL, DATA, CMPL, PWF, DWF, LO, DEq>
impl<'storage, 'sg, 'rslv, LABEL, DATA, CMPL, PWF, DWF, LO, DEq> !UnwindSafe for Query<'storage, 'sg, 'rslv, LABEL, DATA, CMPL, PWF, DWF, LO, DEq>
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