Skip to main content

MethodSelector

Trait MethodSelector 

Source
pub trait MethodSelector {
    // Required method
    fn matches(&self, method: &Method) -> bool;
}
Expand description

Selector trait used by Class::method and crate::structs::Object::method.

Required Methods§

Source

fn matches(&self, method: &Method) -> bool

Returns true if the method matches the selector criteria

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl MethodSelector for &str

Selects a method by name.

Source§

fn matches(&self, method: &Method) -> bool

Source§

impl MethodSelector for (&str, &[&str])

Selects a method by name and parameter type names.

Source§

fn matches(&self, method: &Method) -> bool

Source§

impl MethodSelector for (&str, usize)

Selects a method by name and parameter count.

Source§

fn matches(&self, method: &Method) -> bool

Source§

impl<const N: usize> MethodSelector for (&str, [&str; N])

Selects a method by name and parameter type names using a fixed-size array.

Source§

fn matches(&self, method: &Method) -> bool

Implementors§