pub struct ApplyResult<'a> { /* private fields */ }Expand description
This type represents the result of a patch operation.
It contains the possibly modified ROM data and a boolean indicating whether the patch was successful or not.
see ApplyResult::success for more information.
Implementations§
Source§impl ApplyResult<'_>
impl ApplyResult<'_>
Sourcepub fn warnings(&self) -> Vec<WarningData> ⓘ
pub fn warnings(&self) -> Vec<WarningData> ⓘ
Returns the warnings from the apply operation.
Sourcepub fn errors(&self) -> Vec<ErrorData>
pub fn errors(&self) -> Vec<ErrorData>
Returns the errors from the apply operation.
See the notes in the ApplyResult type for more information.
Sourcepub fn labels(&self) -> Vec<Label>
pub fn labels(&self) -> Vec<Label>
Returns the labels from the apply operation.
See the notes in the ApplyResult type for more information.
Sourcepub fn label_value(&self, name: &str) -> Option<i32>
pub fn label_value(&self, name: &str) -> Option<i32>
Returns the value of a label from the apply operation.
See the notes in the ApplyResult type for more information.
Sourcepub fn define(&self, name: &str) -> Option<String>
pub fn define(&self, name: &str) -> Option<String>
Returns the value of a define from the apply operation.
See the notes in the ApplyResult type for more information.
Sourcepub fn defines(&self) -> Vec<Define>
pub fn defines(&self) -> Vec<Define>
Returns the defines from the apply operation.
See the notes in the ApplyResult type for more information.
Sourcepub fn written_blocks(&self) -> Vec<WrittenBlock>
pub fn written_blocks(&self) -> Vec<WrittenBlock>
Returns the written blocks from the apply operation.
See the notes in the ApplyResult type for more information.
Sourcepub fn mapper_type(&self) -> Option<MapperType>
pub fn mapper_type(&self) -> Option<MapperType>
Returns the mapper type from the apply operation.
See the notes in the ApplyResult type for more information.
Sourcepub fn symbols_file(&self, symboltype: SymbolType) -> Option<String>
pub fn symbols_file(&self, symboltype: SymbolType) -> Option<String>
Returns the symbols file from the apply operation.
See the notes in the ApplyResult type for more information.
Sourcepub fn romdata(self) -> RomData
pub fn romdata(self) -> RomData
Consumes the ApplyResult and returns the ROM data.
This will reset Asar, clearing all the errors, warnings and prints.
Calling this method will allow another patch operation to be done with the Patcher::apply method.