pub struct OverlayTable<'a> { /* private fields */ }Expand description
An overlay table, used for both ARM9 and ARM7 overlays. This is the plain struct, see the raw one here.
Implementations§
Source§impl<'a> OverlayTable<'a>
impl<'a> OverlayTable<'a>
Sourcepub fn new(overlays: Vec<Overlay<'a>>) -> Self
pub fn new(overlays: Vec<Overlay<'a>>) -> Self
Creates a new OverlayTable.
Sourcepub fn overlays(&self) -> &[Overlay<'a>]
pub fn overlays(&self) -> &[Overlay<'a>]
Returns a reference to the overlays of this OverlayTable.
Sourcepub fn overlays_mut(&mut self) -> &mut [Overlay<'a>]
pub fn overlays_mut(&mut self) -> &mut [Overlay<'a>]
Returns a mutable reference to the overlays of this OverlayTable.
Sourcepub fn len(&self) -> usize
pub fn len(&self) -> usize
Returns the length of this OverlayTable.
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Returns true if this OverlayTable is empty.
Sourcepub fn parse_arm9(
raw: OverlayTable<'_>,
rom: &'a Rom<'_>,
arm9: &Arm9<'_>,
) -> Result<Self, OverlayError>
pub fn parse_arm9( raw: OverlayTable<'_>, rom: &'a Rom<'_>, arm9: &Arm9<'_>, ) -> Result<Self, OverlayError>
Sourcepub fn parse_arm7(
raw: OverlayTable<'_>,
rom: &'a Rom<'_>,
) -> Result<Self, OverlayError>
pub fn parse_arm7( raw: OverlayTable<'_>, rom: &'a Rom<'_>, ) -> Result<Self, OverlayError>
Sourcepub fn build(&self) -> OverlayTable<'a>
pub fn build(&self) -> OverlayTable<'a>
Builds a raw overlay table.
Sourcepub fn compute_signature(&self, hmac_sha1: &HmacSha1) -> HmacSha1Signature
pub fn compute_signature(&self, hmac_sha1: &HmacSha1) -> HmacSha1Signature
Computes the HMAC-SHA1 signature of this overlay table using the given HMAC-SHA1 instance.
Sourcepub fn verify_signature(&self, hmac_sha1: &HmacSha1) -> bool
pub fn verify_signature(&self, hmac_sha1: &HmacSha1) -> bool
Verifies the HMAC-SHA1 signature of this overlay table using the given HMAC-SHA1 instance.
Sourcepub fn signature(&self) -> Option<HmacSha1Signature>
pub fn signature(&self) -> Option<HmacSha1Signature>
Returns the HMAC-SHA1 signature of this overlay table, if it exists.
Sourcepub fn sign(&mut self, hmac_sha1: &HmacSha1)
pub fn sign(&mut self, hmac_sha1: &HmacSha1)
Computes and sets the HMAC-SHA1 signature of this overlay table.
Sourcepub fn set_signature(&mut self, signature: HmacSha1Signature)
pub fn set_signature(&mut self, signature: HmacSha1Signature)
Sets the signature of this overlay table.
Trait Implementations§
Source§impl<'a> Clone for OverlayTable<'a>
impl<'a> Clone for OverlayTable<'a>
Source§fn clone(&self) -> OverlayTable<'a>
fn clone(&self) -> OverlayTable<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Default for OverlayTable<'a>
impl<'a> Default for OverlayTable<'a>
Source§fn default() -> OverlayTable<'a>
fn default() -> OverlayTable<'a>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'a> Freeze for OverlayTable<'a>
impl<'a> RefUnwindSafe for OverlayTable<'a>
impl<'a> Send for OverlayTable<'a>
impl<'a> Sync for OverlayTable<'a>
impl<'a> Unpin for OverlayTable<'a>
impl<'a> UnsafeUnpin for OverlayTable<'a>
impl<'a> UnwindSafe for OverlayTable<'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