pub struct FunctionQuery {
pub name_pattern: Option<String>,
pub arity: Option<u16>,
pub min_instructions: Option<usize>,
pub max_instructions: Option<usize>,
pub calls_function: Option<[u8; 32]>,
pub uses_type: Option<String>,
pub is_async: Option<bool>,
pub is_closure: Option<bool>,
}Expand description
Query for searching functions.
Fields§
§name_pattern: Option<String>§arity: Option<u16>§min_instructions: Option<usize>§max_instructions: Option<usize>§calls_function: Option<[u8; 32]>§uses_type: Option<String>§is_async: Option<bool>§is_closure: Option<bool>Implementations§
Source§impl FunctionQuery
impl FunctionQuery
Sourcepub fn with_name_pattern(self, pattern: impl Into<String>) -> Self
pub fn with_name_pattern(self, pattern: impl Into<String>) -> Self
Filter by name substring.
Sourcepub fn with_arity(self, arity: u16) -> Self
pub fn with_arity(self, arity: u16) -> Self
Filter by exact arity.
Sourcepub fn with_min_instructions(self, min: usize) -> Self
pub fn with_min_instructions(self, min: usize) -> Self
Filter by minimum instruction count.
Sourcepub fn with_max_instructions(self, max: usize) -> Self
pub fn with_max_instructions(self, max: usize) -> Self
Filter by maximum instruction count.
Sourcepub fn with_calls_function(self, hash: [u8; 32]) -> Self
pub fn with_calls_function(self, hash: [u8; 32]) -> Self
Filter to functions that call a specific function hash.
Sourcepub fn with_uses_type(self, type_name: impl Into<String>) -> Self
pub fn with_uses_type(self, type_name: impl Into<String>) -> Self
Filter to functions that reference a type schema.
Sourcepub fn with_async(self, is_async: bool) -> Self
pub fn with_async(self, is_async: bool) -> Self
Filter by async status.
Sourcepub fn with_closure(self, is_closure: bool) -> Self
pub fn with_closure(self, is_closure: bool) -> Self
Filter by closure status.
Trait Implementations§
Source§impl Clone for FunctionQuery
impl Clone for FunctionQuery
Source§fn clone(&self) -> FunctionQuery
fn clone(&self) -> FunctionQuery
Returns a duplicate of the value. Read more
1.0.0 · 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 FunctionQuery
impl Debug for FunctionQuery
Source§impl Default for FunctionQuery
impl Default for FunctionQuery
Source§fn default() -> FunctionQuery
fn default() -> FunctionQuery
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for FunctionQuery
impl RefUnwindSafe for FunctionQuery
impl Send for FunctionQuery
impl Sync for FunctionQuery
impl Unpin for FunctionQuery
impl UnsafeUnpin for FunctionQuery
impl UnwindSafe for FunctionQuery
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more