pub struct ComponentPC(/* private fields */);Expand description
A Wasm bytecode offset relative to the start of a component (or top-level module) binary.
When compiling a component, the Wasm parser returns source
positions relative to the entire component binary. This type
captures that convention. Use
ComponentPC::to_module_pc to convert to a
ModulePC given the byte offset of the module within the
component.
Implementations§
Source§impl ComponentPC
impl ComponentPC
Sourcepub fn to_module_pc(self, wasm_module_offset: u64) -> ModulePC
pub fn to_module_pc(self, wasm_module_offset: u64) -> ModulePC
Convert to a module-relative PC by subtracting the byte offset of the module within the component binary.
Trait Implementations§
Source§impl Clone for ComponentPC
impl Clone for ComponentPC
Source§fn clone(&self) -> ComponentPC
fn clone(&self) -> ComponentPC
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 moreSource§impl Debug for ComponentPC
impl Debug for ComponentPC
Source§impl Display for ComponentPC
impl Display for ComponentPC
Source§impl Hash for ComponentPC
impl Hash for ComponentPC
Source§impl Ord for ComponentPC
impl Ord for ComponentPC
Source§fn cmp(&self, other: &ComponentPC) -> Ordering
fn cmp(&self, other: &ComponentPC) -> Ordering
1.21.0 · 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
Source§impl PartialEq for ComponentPC
impl PartialEq for ComponentPC
Source§impl PartialOrd for ComponentPC
impl PartialOrd for ComponentPC
impl Copy for ComponentPC
impl Eq for ComponentPC
impl StructuralPartialEq for ComponentPC
Auto Trait Implementations§
impl Freeze for ComponentPC
impl RefUnwindSafe for ComponentPC
impl Send for ComponentPC
impl Sync for ComponentPC
impl Unpin for ComponentPC
impl UnwindSafe for ComponentPC
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,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.