pub struct ExceptionTable<'a> { /* private fields */ }Expand description
ExceptionTable deserialized from a serialized slice.
This struct retains borrows of the various serialized parts of the
exception table data as produced by
ExceptionTableBuilder::serialize.
Implementations§
Source§impl<'a> ExceptionTable<'a>
impl<'a> ExceptionTable<'a>
Sourcepub fn parse(data: &'a [u8]) -> Result<ExceptionTable<'a>>
pub fn parse(data: &'a [u8]) -> Result<ExceptionTable<'a>>
Parse exception tables from a byte-slice as produced by
ExceptionTableBuilder::serialize.
Sourcepub fn lookup(&self, pc: u32, tag: u32) -> Option<u32>
pub fn lookup(&self, pc: u32, tag: u32) -> Option<u32>
Look up the handler destination, if any, for a given return address (as an offset into the code section) and exception tag.
Note: we use raw u32 types for code offsets and tags here to
avoid dependencies on cranelift-codegen when this crate is
built without compiler backend support (runtime-only config).
Trait Implementations§
Source§impl<'a> Clone for ExceptionTable<'a>
impl<'a> Clone for ExceptionTable<'a>
Source§fn clone(&self) -> ExceptionTable<'a>
fn clone(&self) -> ExceptionTable<'a>
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<'a> Freeze for ExceptionTable<'a>
impl<'a> RefUnwindSafe for ExceptionTable<'a>
impl<'a> Send for ExceptionTable<'a>
impl<'a> Sync for ExceptionTable<'a>
impl<'a> Unpin for ExceptionTable<'a>
impl<'a> UnwindSafe for ExceptionTable<'a>
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