Struct Query

Source
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>

Source

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,

Source

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,

Source

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,

Source

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,

Source§

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 of Completeness. This guarantees that the query resolution result will remain valid, even in the presence of future additions to the scope graph.
  • ENVC: The EnvContainer (determined by CMPL) 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
Source§

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>
where PWF: Freeze, DWF: Freeze, LO: Freeze, DEq: Freeze,

§

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>
where PWF: Unpin, DWF: Unpin, LO: Unpin, DEq: Unpin,

§

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> 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.