Enum MethodHandlerResult
pub enum MethodHandlerResult {
Found(HandlerMatch),
ExecuteCleanup {
handlers: Vec<HandlerMatch>,
},
NotFound,
}Expand description
Result of searching for an exception handler within a single method.
This enum represents the possible outcomes when searching a method’s exception clauses for a handler that matches a thrown exception.
§Variants
Found- A matching catch or filter handler was foundExecuteCleanup- Cleanup handlers must run before continuing (finally/fault blocks, or cleanup before catch)NotFound- No handler in this method; continue unwinding to the caller
Variants§
Found(HandlerMatch)
Found a suitable catch or filter handler in this method.
The handler can be entered after any pending cleanup handlers complete.
ExecuteCleanup
Cleanup handlers must be executed before continuing.
This variant is returned when:
- Finally/fault blocks need to run before entering a catch handler
- Finally/fault blocks need to run before continuing the unwind
The handlers should be executed in order, with the last one potentially being a catch handler.
Fields
§
handlers: Vec<HandlerMatch>Cleanup handlers to execute in order.
NotFound
No matching handler was found in this method.
The exception handling system should continue unwinding to the caller.
Trait Implementations§
§impl Clone for MethodHandlerResult
impl Clone for MethodHandlerResult
§fn clone(&self) -> MethodHandlerResult
fn clone(&self) -> MethodHandlerResult
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for MethodHandlerResult
impl RefUnwindSafe for MethodHandlerResult
impl Send for MethodHandlerResult
impl Sync for MethodHandlerResult
impl Unpin for MethodHandlerResult
impl UnwindSafe for MethodHandlerResult
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more