pub struct Handler {
pub start: u32,
pub end: u32,
pub target: Target,
pub catch: Reg,
}Expand description
An exception-handling region: an error raised by an instruction at a pc
in start..end transfers control to target with the error value in
catch.
A function’s handlers are searched in order and the first that covers the faulting pc wins, so inner regions are listed before the regions that enclose them.
§Examples
use bytecode_lang::{Handler, Reg, Target};
let h = Handler { start: 0, end: 5, target: Target(7), catch: Reg(3) };
assert!(h.start < h.end);Fields§
§start: u32First covered pc.
end: u32One past the last covered pc.
target: TargetWhere control continues when an error is caught.
catch: RegThe dyn register that receives the error value.
Trait Implementations§
impl Copy for Handler
impl Eq for Handler
Source§impl Ord for Handler
impl Ord for Handler
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Handler
impl PartialOrd for Handler
impl StructuralPartialEq for Handler
Auto Trait Implementations§
impl Freeze for Handler
impl RefUnwindSafe for Handler
impl Send for Handler
impl Sync for Handler
impl Unpin for Handler
impl UnsafeUnpin for Handler
impl UnwindSafe for Handler
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