Struct BytecodeSectionView
pub struct BytecodeSectionView<'bc, C> { /* private fields */ }Expand description
A lightweight view into a parsed bytecode section.
Implementations§
§impl<'bc, C> BytecodeSectionView<'bc, C>
impl<'bc, C> BytecodeSectionView<'bc, C>
pub fn path(&self) -> &'bc SectionPath
pub fn display_path(&self) -> &'bc SectionPath
pub fn context_handle(&self) -> ContextHandle<C>
pub fn children(&self) -> impl Iterator<Item = BytecodeSectionView<'bc, C>>
pub fn child(&self, local_name: &str) -> Option<BytecodeSectionView<'bc, C>>
pub fn local_name(&self) -> Option<&str>
pub fn header_bytes(&self) -> &'bc [u8] ⓘ
pub fn bytecode(&self) -> &'bc [u8] ⓘ
pub fn decode_header<H>(&self) -> Result<H, Report>where
H: BytecodeHeader,
pub fn decode_header<H>(&self) -> Result<H, Report>where
H: BytecodeHeader,
Decode the specified composite header from raw header bytes.
pub fn decode_instructions<I>(&self) -> Result<Vec<I>, Report>where
I: Instruction,
pub fn decode_instructions<I>(&self) -> Result<Vec<I>, Report>where
I: Instruction,
Decode this section’s bytecode body as an instruction stream.
Trait Implementations§
§impl<'bc, C> Clone for BytecodeSectionView<'bc, C>
impl<'bc, C> Clone for BytecodeSectionView<'bc, C>
§fn clone(&self) -> BytecodeSectionView<'bc, C>
fn clone(&self) -> BytecodeSectionView<'bc, C>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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<'bc, C> Freeze for BytecodeSectionView<'bc, C>
impl<'bc, C> RefUnwindSafe for BytecodeSectionView<'bc, C>where
C: RefUnwindSafe,
impl<'bc, C> Send for BytecodeSectionView<'bc, C>
impl<'bc, C> Sync for BytecodeSectionView<'bc, C>
impl<'bc, C> Unpin for BytecodeSectionView<'bc, C>
impl<'bc, C> UnsafeUnpin for BytecodeSectionView<'bc, C>
impl<'bc, C> UnwindSafe for BytecodeSectionView<'bc, C>where
C: RefUnwindSafe,
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<'src, T> IntoMaybe<'src, T> for Twhere
T: 'src,
impl<'src, T> IntoMaybe<'src, T> for Twhere
T: 'src,
impl<T> OrderedSeq<'_, T> for Twhere
T: Clone,
§impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
§type Iter<'a> = Once<&'a T>
where
T: 'a
type Iter<'a> = Once<&'a T> where T: 'a
An iterator over the items within this container, by reference.
§fn contains(&self, val: &T) -> boolwhere
T: PartialEq,
fn contains(&self, val: &T) -> boolwhere
T: PartialEq,
Check whether an item is contained within this sequence.
§fn to_maybe_ref<'b>(item: <T as Seq<'p, T>>::Item<'b>) -> Maybe<T, &'p T>where
'p: 'b,
fn to_maybe_ref<'b>(item: <T as Seq<'p, T>>::Item<'b>) -> Maybe<T, &'p T>where
'p: 'b,
Convert an item of the sequence into a [
MaybeRef].