pub struct CustomSections<'a> { /* private fields */ }Expand description
Intermediate Representation of Custom Sections
Implementations§
Source§impl<'a> CustomSections<'a>
impl<'a> CustomSections<'a>
pub fn new(custom_sections: Vec<(&'a str, &'a [u8])>) -> Self
Sourcepub fn get_id(&self, name: String) -> Option<CustomSectionID>
pub fn get_id(&self, name: String) -> Option<CustomSectionID>
Get a custom section ID by name
Sourcepub fn get_by_id(
&self,
custom_section_id: CustomSectionID,
) -> Result<&CustomSection<'_>>
pub fn get_by_id( &self, custom_section_id: CustomSectionID, ) -> Result<&CustomSection<'_>>
Get a custom section by its ID
Sourcepub fn iter(&self) -> Iter<'_, CustomSection<'a>> ⓘ
pub fn iter(&self) -> Iter<'_, CustomSection<'a>> ⓘ
Creates an iterable over the custom sections
Sourcepub fn get_section_data_mut(
&mut self,
section_id: CustomSectionID,
) -> Option<&mut Vec<u8>>
pub fn get_section_data_mut( &mut self, section_id: CustomSectionID, ) -> Option<&mut Vec<u8>>
Get mutable reference to section data
Trait Implementations§
Source§impl<'a> Clone for CustomSections<'a>
impl<'a> Clone for CustomSections<'a>
Source§impl<'a> Debug for CustomSections<'a>
impl<'a> Debug for CustomSections<'a>
Auto Trait Implementations§
impl<'a> Freeze for CustomSections<'a>
impl<'a> RefUnwindSafe for CustomSections<'a>
impl<'a> Send for CustomSections<'a>
impl<'a> Sync for CustomSections<'a>
impl<'a> Unpin for CustomSections<'a>
impl<'a> UnsafeUnpin for CustomSections<'a>
impl<'a> UnwindSafe for CustomSections<'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