pub trait MethodThrowTypeProvider: Provider {
// Required methods
fn targets() -> &'static [MethodTarget]
where Self: Sized;
fn get_thrown_exceptions(
&self,
context: &ProviderContext<'_, '_, '_>,
class_name: &str,
method_name: &str,
invocation: &InvocationInfo<'_, '_, '_>,
) -> HashSet<Atom>;
}Expand description
Provider for getting thrown exception class names from method calls.
Required Methods§
Sourcefn targets() -> &'static [MethodTarget]where
Self: Sized,
fn targets() -> &'static [MethodTarget]where
Self: Sized,
The methods this provider handles.
Sourcefn get_thrown_exceptions(
&self,
context: &ProviderContext<'_, '_, '_>,
class_name: &str,
method_name: &str,
invocation: &InvocationInfo<'_, '_, '_>,
) -> HashSet<Atom>
fn get_thrown_exceptions( &self, context: &ProviderContext<'_, '_, '_>, class_name: &str, method_name: &str, invocation: &InvocationInfo<'_, '_, '_>, ) -> HashSet<Atom>
Get the exception class names that a method invocation can throw.
Returns a set of fully qualified exception class names. Returns an empty set if the method doesn’t throw.