pub struct Overlay<'a> { /* private fields */ }Expand description
An overlay module for ARM9/ARM7.
Implementations§
source§impl<'a> Overlay<'a>
impl<'a> Overlay<'a>
sourcepub fn new<T: Into<Cow<'a, [u8]>>>(
data: T,
header_version: HeaderVersion,
info: OverlayInfo,
) -> Self
pub fn new<T: Into<Cow<'a, [u8]>>>( data: T, header_version: HeaderVersion, info: OverlayInfo, ) -> Self
Creates a new Overlay from plain data.
sourcepub fn parse(
overlay: &Overlay,
fat: &[FileAlloc],
rom: &'a Rom<'_>,
) -> Result<Self, RawHeaderError>
pub fn parse( overlay: &Overlay, fat: &[FileAlloc], rom: &'a Rom<'_>, ) -> Result<Self, RawHeaderError>
Parses an Overlay from a FAT and ROM.
sourcepub fn base_address(&self) -> u32
pub fn base_address(&self) -> u32
Returns the base address of this Overlay.
sourcepub fn ctor_start(&self) -> u32
pub fn ctor_start(&self) -> u32
Returns the offset to the start of the .ctor section.
sourcepub fn is_compressed(&self) -> bool
pub fn is_compressed(&self) -> bool
Returns whether this Overlay is compressed.
sourcepub fn decompress(&mut self)
pub fn decompress(&mut self)
Decompresses this Overlay, but does nothing if already decompressed.
sourcepub fn info(&self) -> &OverlayInfo
pub fn info(&self) -> &OverlayInfo
Returns a reference to the info of this Overlay.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Overlay<'a>
impl<'a> RefUnwindSafe for Overlay<'a>
impl<'a> Send for Overlay<'a>
impl<'a> Sync for Overlay<'a>
impl<'a> Unpin for Overlay<'a>
impl<'a> UnwindSafe for Overlay<'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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)