pub enum RaiseKind {
BareRaise,
Raise,
RaiseCause,
ReraiseFromStack,
}Expand description
The kind of Raise that occurred.
Variants§
BareRaise
Bare raise statement with no arguments.
Gets the current exception from VM state (topmost_exception).
Maps to RAISE_VARARGS with oparg=0.
Raise
raise exc - exception is on the stack.
Maps to RAISE_VARARGS with oparg=1.
RaiseCause
raise exc from cause - exception and cause are on the stack.
Maps to RAISE_VARARGS with oparg=2.
ReraiseFromStack
Reraise exception from the stack top. Used in exception handler cleanup blocks (finally, except). Gets exception from stack, not from VM state. Maps to the RERAISE opcode.
Trait Implementations§
impl Copy for RaiseKind
impl Eq for RaiseKind
impl OpArgType for RaiseKind
impl StructuralPartialEq for RaiseKind
Auto Trait Implementations§
impl Freeze for RaiseKind
impl RefUnwindSafe for RaiseKind
impl Send for RaiseKind
impl Sync for RaiseKind
impl Unpin for RaiseKind
impl UnsafeUnpin for RaiseKind
impl UnwindSafe for RaiseKind
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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