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