[][src]Struct ck3save::Ck3ExtractorBuilder

pub struct Ck3ExtractorBuilder { /* fields omitted */ }

Customize how a save is extracted

Implementations

impl Ck3ExtractorBuilder[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_header_owned(
    &self,
    data: &[u8]
) -> Result<(HeaderOwned, Encoding), Ck3Error>
[src]

Extract the header from the save.

pub fn extract_header_borrowed<'a>(
    &self,
    data: &'a [u8]
) -> Result<(HeaderBorrowed<'a>, Encoding), Ck3Error>
[src]

Extract the header from the save with zero copy deserialization.

pub fn extract_header_as<'de, T>(
    &self,
    data: &'de [u8]
) -> Result<(T, Encoding), Ck3Error> where
    T: Deserialize<'de>, 
[src]

Extract the header from the save as a custom type

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

Extract all info from a save

pub fn extract_save_as<T, R>(
    &self,
    reader: R
) -> Result<(T, Encoding), Ck3Error> where
    R: Read + Seek,
    T: DeserializeOwned
[src]

Extract all info from a save as a custom type

Trait Implementations

impl Clone for Ck3ExtractorBuilder[src]

impl Debug for Ck3ExtractorBuilder[src]

impl Default for Ck3ExtractorBuilder[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.