pub struct Section<'a> {
pub flags: SectionFlags,
/* private fields */
}
Expand description
A section in an object file.
Fields
flags: SectionFlags
Section flags that are specific to each file format.
Implementations
sourceimpl<'a> Section<'a>
impl<'a> Section<'a>
sourcepub fn set_data<T>(&mut self, data: T, align: u64) where
T: Into<Cow<'a, [u8]>>,
pub fn set_data<T>(&mut self, data: T, align: u64) where
T: Into<Cow<'a, [u8]>>,
Set the data for a section.
Must not be called for sections that already have data, or that contain uninitialized data.
sourcepub fn append_data(&mut self, append_data: &[u8], align: u64) -> u64
pub fn append_data(&mut self, append_data: &[u8], align: u64) -> u64
Append data to a section.
Must not be called for sections that contain uninitialized data.
sourcepub fn append_bss(&mut self, size: u64, align: u64) -> u64
pub fn append_bss(&mut self, size: u64, align: u64) -> u64
Append unitialized data to a section.
Must not be called for sections that contain initialized data.
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for Section<'a>
impl<'a> Send for Section<'a>
impl<'a> Sync for Section<'a>
impl<'a> Unpin for Section<'a>
impl<'a> UnwindSafe for Section<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more