Skip to main content

MethodThrowTypeProvider

Trait MethodThrowTypeProvider 

Source
pub trait MethodThrowTypeProvider: Provider {
    // Required methods
    fn targets() -> &'static [MethodTarget]
       where Self: Sized;
    fn get_thrown_exceptions(
        &self,
        context: &ProviderContext<'_, '_, '_>,
        class_name: &[u8],
        method_name: &[u8],
        invocation: &InvocationInfo<'_, '_, '_>,
    ) -> HashSet<Word>;
}
Expand description

Provider for getting thrown exception class names from method calls.

Required Methods§

Source

fn targets() -> &'static [MethodTarget]
where Self: Sized,

The methods this provider handles.

Source

fn get_thrown_exceptions( &self, context: &ProviderContext<'_, '_, '_>, class_name: &[u8], method_name: &[u8], invocation: &InvocationInfo<'_, '_, '_>, ) -> HashSet<Word>

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.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§