Struct imperator_save::ImperatorExtractorBuilder
source · [−]pub struct ImperatorExtractorBuilder { /* private fields */ }
Expand description
Customize how a save is extracted
Implementations
sourceimpl ImperatorExtractorBuilder
impl ImperatorExtractorBuilder
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_header_owned(
&self,
data: &[u8]
) -> Result<(HeaderOwned, Encoding), ImperatorError>
pub fn extract_header_owned(
&self,
data: &[u8]
) -> Result<(HeaderOwned, Encoding), ImperatorError>
Extract the header from the save.
sourcepub fn extract_header_borrowed<'a>(
&self,
data: &'a [u8]
) -> Result<(HeaderBorrowed<'a>, Encoding), ImperatorError>
pub fn extract_header_borrowed<'a>(
&self,
data: &'a [u8]
) -> Result<(HeaderBorrowed<'a>, Encoding), ImperatorError>
Extract the header from the save with zero copy deserialization.
sourcepub fn extract_header_with_tokens_as<'de, T, Q>(
&self,
data: &'de [u8],
resolver: &'de Q
) -> Result<(T, Encoding), ImperatorError> where
T: Deserialize<'de>,
Q: TokenResolver,
pub fn extract_header_with_tokens_as<'de, T, Q>(
&self,
data: &'de [u8],
resolver: &'de Q
) -> Result<(T, Encoding), ImperatorError> where
T: Deserialize<'de>,
Q: TokenResolver,
Extract the header from the save as a custom type
sourcepub fn extract_header_as<'de, T>(
&self,
data: &'de [u8]
) -> Result<(T, Encoding), ImperatorError> where
T: Deserialize<'de>,
pub fn extract_header_as<'de, T>(
&self,
data: &'de [u8]
) -> Result<(T, Encoding), ImperatorError> where
T: Deserialize<'de>,
Extract the header from the save as a custom type
sourcepub fn extract_save<R>(
&self,
reader: R
) -> Result<(Save, Encoding), ImperatorError> where
R: Read + Seek,
pub fn extract_save<R>(
&self,
reader: R
) -> Result<(Save, Encoding), ImperatorError> where
R: Read + Seek,
Extract all info from a save
sourcepub fn extract_save_with_tokens<R, Q>(
&self,
reader: R,
resolver: &Q
) -> Result<(Save, Encoding), ImperatorError> where
R: Read + Seek,
Q: TokenResolver,
pub fn extract_save_with_tokens<R, Q>(
&self,
reader: R,
resolver: &Q
) -> Result<(Save, Encoding), ImperatorError> where
R: Read + Seek,
Q: TokenResolver,
Extract all info from a save
Trait Implementations
sourceimpl Clone for ImperatorExtractorBuilder
impl Clone for ImperatorExtractorBuilder
sourcefn clone(&self) -> ImperatorExtractorBuilder
fn clone(&self) -> ImperatorExtractorBuilder
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 ImperatorExtractorBuilder
impl Debug for ImperatorExtractorBuilder
Auto Trait Implementations
impl RefUnwindSafe for ImperatorExtractorBuilder
impl Send for ImperatorExtractorBuilder
impl Sync for ImperatorExtractorBuilder
impl Unpin for ImperatorExtractorBuilder
impl UnwindSafe for ImperatorExtractorBuilder
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