Struct eu4save::Eu4Extractor
source · [−]pub struct Eu4Extractor {}
Expand description
Logic container for extracting data from an EU4 save
Implementations
sourceimpl Eu4Extractor
impl Eu4Extractor
sourcepub fn builder() -> Eu4ExtractorBuilder
pub fn builder() -> Eu4ExtractorBuilder
Create a customized container
sourcepub fn extract_meta<R>(reader: R) -> Result<(Meta, Encoding), Eu4Error> where
R: Read + Seek,
pub fn extract_meta<R>(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<R>(reader: R) -> Result<(Eu4Save, Encoding), Eu4Error> where
R: Read + Seek,
pub fn extract_save<R>(reader: R) -> Result<(Eu4Save, Encoding), Eu4Error> where
R: Read + Seek,
Extract all info from a save
sourcepub fn extract_meta_optimistic<R>(
reader: R
) -> Result<(Eu4SaveMeta, Encoding), Eu4Error> where
R: Read + Seek,
pub fn extract_meta_optimistic<R>(
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_raw<'de, T>(
data: &'de [u8]
) -> Result<(T, RawEncoding), Eu4Error> where
T: Deserialize<'de>,
pub fn extract_raw<'de, T>(
data: &'de [u8]
) -> Result<(T, RawEncoding), Eu4Error> where
T: Deserialize<'de>,
Customize how data is deserialized from raw data
Trait Implementations
sourceimpl Clone for Eu4Extractor
impl Clone for Eu4Extractor
sourcefn clone(&self) -> Eu4Extractor
fn clone(&self) -> Eu4Extractor
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
Auto Trait Implementations
impl RefUnwindSafe for Eu4Extractor
impl Send for Eu4Extractor
impl Sync for Eu4Extractor
impl Unpin for Eu4Extractor
impl UnwindSafe for Eu4Extractor
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
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.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more