pub trait ExpressionThrowTypeProvider: Provider {
// Required method
fn get_thrown_exceptions(
&self,
context: &ProviderContext<'_, '_, '_>,
expression: &Expression<'_>,
) -> HashSet<Word>;
}Expand description
Provider for getting thrown exception class names from any expression.
This is the most general form of throw type provider, allowing plugins to specify exceptions for any expression type (property access, array access, etc.).
Required Methods§
Sourcefn get_thrown_exceptions(
&self,
context: &ProviderContext<'_, '_, '_>,
expression: &Expression<'_>,
) -> HashSet<Word>
fn get_thrown_exceptions( &self, context: &ProviderContext<'_, '_, '_>, expression: &Expression<'_>, ) -> HashSet<Word>
Get the exception class names that an expression can throw.
Returns a set of fully qualified exception class names. Returns an empty set if the expression doesn’t throw.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".