[][src]Struct eu4save::Eu4ExtractorBuilder

pub struct Eu4ExtractorBuilder { /* fields omitted */ }

Customize how a save is extracted

Implementations

impl Eu4ExtractorBuilder[src]

pub fn new() -> Self[src]

Create a new extractor with default values: extract zips into memory

pub fn with_extraction(self, extraction: Extraction) -> Self[src]

Set the memory allocation extraction behavior for when a zip is encountered

pub fn with_on_failed_resolve(self, strategy: FailedResolveStrategy) -> Self[src]

Set the behavior for when an unresolved binary token is encountered

pub fn extract_meta<R>(&self, reader: R) -> Result<(Meta, Encoding), Eu4Error> where
    R: Read + Seek
[src]

Extract just the metadata from the save. This can be efficiently done if a file is zip encoded.

pub fn extract_save<R>(
    &self,
    reader: R
) -> Result<(Eu4Save, Encoding), Eu4Error> where
    R: Read + Seek
[src]

Extract all info from a save

pub fn extract_meta_optimistic<R>(
    &self,
    reader: R
) -> Result<(Eu4SaveMeta, Encoding), Eu4Error> where
    R: Read + Seek
[src]

For the times where all you want is the metadata but will accept the game state too save on future needless double parsing.

Trait Implementations

impl Clone for Eu4ExtractorBuilder[src]

impl Debug for Eu4ExtractorBuilder[src]

impl Default for Eu4ExtractorBuilder[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.