pub struct MemoryLayout { /* private fields */ }Expand description
Memory layout for a WebAssembly module
Implementations§
Source§impl MemoryLayout
impl MemoryLayout
Sourcepub fn new(hw_caps: HardwareCapabilities) -> Self
pub fn new(hw_caps: HardwareCapabilities) -> Self
Create a new memory layout
Sourcepub fn add_section(&mut self, section: MemorySection) -> Result<()>
pub fn add_section(&mut self, section: MemorySection) -> Result<()>
Add a section to the layout
Sourcepub fn sections(&self) -> &[MemorySection]
pub fn sections(&self) -> &[MemorySection]
Get all sections
Sourcepub fn flash_usage(&self) -> u32
pub fn flash_usage(&self) -> u32
Get flash usage
Sourcepub fn get_section(&self, section_type: SectionType) -> Option<&MemorySection>
pub fn get_section(&self, section_type: SectionType) -> Option<&MemorySection>
Get section by type
Sourcepub fn generate_linker_script(&self) -> String
pub fn generate_linker_script(&self) -> String
Generate GNU LD linker script for ARM Cortex-M
Trait Implementations§
Source§impl Clone for MemoryLayout
impl Clone for MemoryLayout
Source§fn clone(&self) -> MemoryLayout
fn clone(&self) -> MemoryLayout
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 Freeze for MemoryLayout
impl RefUnwindSafe for MemoryLayout
impl Send for MemoryLayout
impl Sync for MemoryLayout
impl Unpin for MemoryLayout
impl UnsafeUnpin for MemoryLayout
impl UnwindSafe for MemoryLayout
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