Struct imperator_save::Melter
source · [−]pub struct Melter { /* private fields */ }
Expand description
Convert a binary gamestate to plaintext
Accepted inputs:
- a save file
- already extracted binary data
Implementations
sourceimpl Melter
impl Melter
sourcepub fn with_extraction(self, extraction: Extraction) -> Self
pub fn with_extraction(self, extraction: Extraction) -> Self
Set the memory allocation extraction behavior for when a zip is encountered
sourcepub fn with_on_failed_resolve(self, strategy: FailedResolveStrategy) -> Self
pub fn with_on_failed_resolve(self, strategy: FailedResolveStrategy) -> Self
Set the behavior for when an unresolved binary token is encountered
sourcepub fn with_rewrite(self, rewrite: bool) -> Self
pub fn with_rewrite(self, rewrite: bool) -> Self
Set if the melter should rewrite properties to better match the plaintext format
Setting to false will preserve binary fields and values even if they don’t make any sense in the plaintext output.
pub fn melt(
&self,
data: &[u8]
) -> Result<(Vec<u8>, HashSet<u16>), ImperatorError>
sourcepub fn melt_with_tokens<Q>(
&self,
data: &[u8],
resolver: &Q
) -> Result<(Vec<u8>, HashSet<u16>), ImperatorError> where
Q: TokenResolver,
pub fn melt_with_tokens<Q>(
&self,
data: &[u8],
resolver: &Q
) -> Result<(Vec<u8>, HashSet<u16>), ImperatorError> where
Q: TokenResolver,
Given one of the accepted inputs, this will return the save id line (if present in the input) with the gamestate data decoded from binary to plain text.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Melter
impl Send for Melter
impl Sync for Melter
impl Unpin for Melter
impl UnwindSafe for Melter
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more