Struct eu4save::Eu4ExtractorBuilder
source · [−]pub struct Eu4ExtractorBuilder { /* private fields */ }
Expand description
Customize how a save is extracted
Implementations
sourceimpl Eu4ExtractorBuilder
impl Eu4ExtractorBuilder
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 extract_meta_with_tokens<R, Q>(
&self,
reader: R,
resolver: &Q
) -> Result<(Meta, Encoding), Eu4Error> where
R: Read + Seek,
Q: TokenResolver,
pub fn extract_meta_with_tokens<R, Q>(
&self,
reader: R,
resolver: &Q
) -> Result<(Meta, Encoding), Eu4Error> where
R: Read + Seek,
Q: TokenResolver,
Extract just the metadata from the save. This can be efficiently done if a file is zip encoded.
sourcepub fn extract_meta<R>(&self, reader: R) -> Result<(Meta, Encoding), Eu4Error> where
R: Read + Seek,
pub fn extract_meta<R>(&self, reader: R) -> Result<(Meta, Encoding), Eu4Error> where
R: Read + Seek,
Extract just the metadata from the save. This can be efficiently done if a file is zip encoded.
sourcepub fn extract_save_with_tokens<R, Q>(
&self,
reader: R,
resolver: &Q
) -> Result<(Eu4Save, Encoding), Eu4Error> where
R: Read + Seek,
Q: TokenResolver,
pub fn extract_save_with_tokens<R, Q>(
&self,
reader: R,
resolver: &Q
) -> Result<(Eu4Save, Encoding), Eu4Error> where
R: Read + Seek,
Q: TokenResolver,
Extract all info from a save
sourcepub fn extract_save<R>(
&self,
reader: R
) -> Result<(Eu4Save, Encoding), Eu4Error> where
R: Read + Seek,
pub fn extract_save<R>(
&self,
reader: R
) -> Result<(Eu4Save, Encoding), Eu4Error> where
R: Read + Seek,
Extract all info from a save
sourcepub fn extract_meta_optimistic<R>(
&self,
reader: R
) -> Result<(Eu4SaveMeta, Encoding), Eu4Error> where
R: Read + Seek,
pub fn extract_meta_optimistic<R>(
&self,
reader: R
) -> Result<(Eu4SaveMeta, Encoding), Eu4Error> where
R: Read + Seek,
For the times where all you want is the metadata but will accept the game state too save on future needless double parsing.
sourcepub fn extract_meta_optimistic_with_tokens<R, Q>(
&self,
reader: R,
resolver: &Q
) -> Result<(Eu4SaveMeta, Encoding), Eu4Error> where
R: Read + Seek,
Q: TokenResolver,
pub fn extract_meta_optimistic_with_tokens<R, Q>(
&self,
reader: R,
resolver: &Q
) -> Result<(Eu4SaveMeta, Encoding), Eu4Error> where
R: Read + Seek,
Q: TokenResolver,
For the times where all you want is the metadata but will accept the game state too save on future needless double parsing.
pub fn extract_raw_with_tokens<'de, T, Q>(
&self,
data: &'de [u8],
resolver: &'de Q
) -> Result<(T, RawEncoding), Eu4Error> where
T: Deserialize<'de>,
Q: TokenResolver,
pub fn extract_raw<'de, T>(
&self,
data: &'de [u8]
) -> Result<(T, RawEncoding), Eu4Error> where
T: Deserialize<'de>,
Trait Implementations
sourceimpl Clone for Eu4ExtractorBuilder
impl Clone for Eu4ExtractorBuilder
sourcefn clone(&self) -> Eu4ExtractorBuilder
fn clone(&self) -> Eu4ExtractorBuilder
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for Eu4ExtractorBuilder
impl Debug for Eu4ExtractorBuilder
Auto Trait Implementations
impl RefUnwindSafe for Eu4ExtractorBuilder
impl Send for Eu4ExtractorBuilder
impl Sync for Eu4ExtractorBuilder
impl Unpin for Eu4ExtractorBuilder
impl UnwindSafe for Eu4ExtractorBuilder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more