pub struct CompiledQuery { /* private fields */ }Expand description
A Query with every regular expression it needs compiled up front.
The string/type pattern, a fuzzy class pattern and a member name used as a
regex are compiled here; a member name matched as a substring (precise
class) or exactly (exact_name) is kept as the plain string. Empty patterns are kept as “no
constraint” exactly as FindRefs::locate
treats them.
Implementations§
Source§impl CompiledQuery
impl CompiledQuery
Sourcepub fn new(q: &Query) -> Result<CompiledQuery, FindError>
pub fn new(q: &Query) -> Result<CompiledQuery, FindError>
Compile q. Fails only when one of its patterns is not a valid regex.
pub fn kind(&self) -> RefKind
pub fn query(&self) -> &Query
Sourcepub fn relation(&self) -> Option<ClassRelation>
pub fn relation(&self) -> Option<ClassRelation>
The class relation an Extends / Implements query asks for.
Sourcepub fn compound(&self) -> Option<&Compound>
pub fn compound(&self) -> Option<&Compound>
The parts of a compound query (Query::All).
Sourcepub fn defined(&self) -> Option<&Defined>
pub fn defined(&self) -> Option<&Defined>
The resolved method-definition predicate of a Query::Defined.
Trait Implementations§
Auto Trait Implementations§
impl Forget for CompiledQuery
impl Freeze for CompiledQuery
impl Move for CompiledQuery
impl RefUnwindSafe for CompiledQuery
impl Send for CompiledQuery
impl Sync for CompiledQuery
impl Unpin for CompiledQuery
impl UnsafeUnpin for CompiledQuery
impl UnwindSafe for CompiledQuery
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