#[non_exhaustive]pub struct MemberQuery {
pub class: Option<ClassQuery>,
pub name: Option<String>,
pub exact_name: bool,
pub signature: Option<MemberSignature>,
}Expand description
Method or field query: at least one of class / name must be set.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.class: Option<ClassQuery>Declaring class of the member, any class when None.
name: Option<String>Fuzzy member name (regex when class is absent or fuzzy, substring
when the class is precise), or the exact name when exact_name is set.
exact_name: boolMatch name exactly (whatever the class constraint) instead of as a
regex / substring; used for “references to this member” lookups.
signature: Option<MemberSignature>Only the members of this signature: one overload of a method, or a field of one type. Checked against the id tables, before any code is scanned.
Implementations§
Source§impl MemberQuery
impl MemberQuery
Sourcepub fn with_class(self, class: Option<ClassQuery>) -> MemberQuery
pub fn with_class(self, class: Option<ClassQuery>) -> MemberQuery
This query with the class constraint class.
Sourcepub fn with_name(self, name: Option<String>) -> MemberQuery
pub fn with_name(self, name: Option<String>) -> MemberQuery
This query with the member name name (see MemberQuery::name).
Sourcepub fn with_exact_name(self, exact_name: bool) -> MemberQuery
pub fn with_exact_name(self, exact_name: bool) -> MemberQuery
This query matching the name exactly (true) or as a pattern.
Sourcepub fn with_signature(self, signature: Option<MemberSignature>) -> MemberQuery
pub fn with_signature(self, signature: Option<MemberSignature>) -> MemberQuery
This query restricted to members of signature.
Trait Implementations§
Source§impl Clone for MemberQuery
impl Clone for MemberQuery
Source§fn clone(&self) -> MemberQuery
fn clone(&self) -> MemberQuery
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MemberQuery
impl Debug for MemberQuery
Source§impl Default for MemberQuery
impl Default for MemberQuery
Source§fn default() -> MemberQuery
fn default() -> MemberQuery
Returns the “default value” for a type. Read more
impl Eq for MemberQuery
Source§impl PartialEq for MemberQuery
impl PartialEq for MemberQuery
impl StructuralPartialEq for MemberQuery
Auto Trait Implementations§
impl Forget for MemberQuery
impl Freeze for MemberQuery
impl Move for MemberQuery
impl RefUnwindSafe for MemberQuery
impl Send for MemberQuery
impl Sync for MemberQuery
impl Unpin for MemberQuery
impl UnsafeUnpin for MemberQuery
impl UnwindSafe for MemberQuery
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