pub struct M64Metadata { /* private fields */ }
Expand description
Metadata for a .m64 TAS.
Implementations§
Source§impl M64Metadata
impl M64Metadata
Sourcepub fn new(crc_code: u32, country_code: u8) -> Self
pub fn new(crc_code: u32, country_code: u8) -> Self
Create a new metadata object with the given CRC and country code.
Sourcepub fn with_version(version: SM64Version) -> Self
pub fn with_version(version: SM64Version) -> Self
Create a new metadata object using the CRC and country code for the given SM64 version.
Sourcepub fn set_crc_code(&mut self, crc_code: u32) -> &mut Self
pub fn set_crc_code(&mut self, crc_code: u32) -> &mut Self
Set the CRC code.
Sourcepub fn country_code(&self) -> u8
pub fn country_code(&self) -> u8
Get the country code.
Sourcepub fn set_country_code(&mut self, country_code: u8) -> &mut Self
pub fn set_country_code(&mut self, country_code: u8) -> &mut Self
Set the country code.
Sourcepub fn version(&self) -> Option<SM64Version>
pub fn version(&self) -> Option<SM64Version>
Return the SM64 version with matching CRC and country code, if it exists.
Sourcepub fn set_version(&mut self, version: SM64Version) -> &mut Self
pub fn set_version(&mut self, version: SM64Version) -> &mut Self
Set the CRC and country code to match the given SM64 version.
Get the author field.
Set the author field (max 222 bytes).
Returns an error if the given string is longer than 222 bytes.
Sourcepub fn description(&self) -> &str
pub fn description(&self) -> &str
Get the description field.
Sourcepub fn set_description(&mut self, description: &str) -> &mut Self
pub fn set_description(&mut self, description: &str) -> &mut Self
Set the description field (max 256 bytes).
§Panics
Panics if the given string is longer than 256 bytes.
Sourcepub fn try_set_description(
&mut self,
description: &str,
) -> Result<&mut Self, Error>
pub fn try_set_description( &mut self, description: &str, ) -> Result<&mut Self, Error>
Set the description field (max 256 bytes).
Returns an error if the given string is longer than 256 bytes.
Sourcepub fn set_rerecords(&mut self, rerecords: u32) -> &mut Self
pub fn set_rerecords(&mut self, rerecords: u32) -> &mut Self
Set the number of rerecords.
Sourcepub fn add_rerecords(&mut self, rerecords: u32) -> &mut Self
pub fn add_rerecords(&mut self, rerecords: u32) -> &mut Self
Add a number of rerecords, saturating on overflow.
Trait Implementations§
Source§impl Clone for M64Metadata
impl Clone for M64Metadata
Source§fn clone(&self) -> M64Metadata
fn clone(&self) -> M64Metadata
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more