pub struct EncodeableExtraData<'a> { /* private fields */ }Expand description
This is a generic struct to easily pass additional data to a Encodeable::encode method.
To know what you need to provide to each file type, please check their documentation.
Implementations§
Source§impl<'a> EncodeableExtraData<'a>
impl<'a> EncodeableExtraData<'a>
Sourcepub fn nullify_dates(&self) -> &bool
pub fn nullify_dates(&self) -> &bool
If we want to set any date or timestamp to 0.
Sourcepub fn table_has_guid(&self) -> &bool
pub fn table_has_guid(&self) -> &bool
Only for tables. If we should add a GUID to its header or not.
Sourcepub fn regenerate_table_guid(&self) -> &bool
pub fn regenerate_table_guid(&self) -> &bool
Only for tables. If we should regenerate the GUID of the table (if it even has one) or keep the current one.
Sourcepub fn game_info(&self) -> &Option<&'a GameInfo>
pub fn game_info(&self) -> &Option<&'a GameInfo>
Full info of the game we’re trying to encode to.
Sourcepub fn compression_format(&self) -> &CompressionFormat
pub fn compression_format(&self) -> &CompressionFormat
The format we’re trying to compress to, if we’re compressing the files.
Sourcepub fn disable_compression(&self) -> &bool
pub fn disable_compression(&self) -> &bool
For recursive encodings in ESF due to compression.
Source§impl<'a> EncodeableExtraData<'a>
impl<'a> EncodeableExtraData<'a>
Sourcepub fn set_test_mode(&mut self, val: bool) -> &mut Self
pub fn set_test_mode(&mut self, val: bool) -> &mut Self
If we’re running the encode method on test mode.
Sourcepub fn set_nullify_dates(&mut self, val: bool) -> &mut Self
pub fn set_nullify_dates(&mut self, val: bool) -> &mut Self
If we want to set any date or timestamp to 0.
Sourcepub fn set_table_has_guid(&mut self, val: bool) -> &mut Self
pub fn set_table_has_guid(&mut self, val: bool) -> &mut Self
Only for tables. If we should add a GUID to its header or not.
Sourcepub fn set_regenerate_table_guid(&mut self, val: bool) -> &mut Self
pub fn set_regenerate_table_guid(&mut self, val: bool) -> &mut Self
Only for tables. If we should regenerate the GUID of the table (if it even has one) or keep the current one.
Sourcepub fn set_game_info(&mut self, val: Option<&'a GameInfo>) -> &mut Self
pub fn set_game_info(&mut self, val: Option<&'a GameInfo>) -> &mut Self
Full info of the game we’re trying to encode to.
Sourcepub fn set_compression_format(&mut self, val: CompressionFormat) -> &mut Self
pub fn set_compression_format(&mut self, val: CompressionFormat) -> &mut Self
The format we’re trying to compress to, if we’re compressing the files.
Sourcepub fn set_disable_compression(&mut self, val: bool) -> &mut Self
pub fn set_disable_compression(&mut self, val: bool) -> &mut Self
For recursive encodings in ESF due to compression.
Source§impl<'a> EncodeableExtraData<'a>
impl<'a> EncodeableExtraData<'a>
Sourcepub fn new_from_game_info(game_info: &'a GameInfo) -> Self
pub fn new_from_game_info(game_info: &'a GameInfo) -> Self
This functions generates an EncodeableExtraData for a specific game.
Trait Implementations§
Source§impl<'a> Clone for EncodeableExtraData<'a>
impl<'a> Clone for EncodeableExtraData<'a>
Source§fn clone(&self) -> EncodeableExtraData<'a>
fn clone(&self) -> EncodeableExtraData<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'a> Default for EncodeableExtraData<'a>
impl<'a> Default for EncodeableExtraData<'a>
Source§fn default() -> EncodeableExtraData<'a>
fn default() -> EncodeableExtraData<'a>
Auto Trait Implementations§
impl<'a> Freeze for EncodeableExtraData<'a>
impl<'a> RefUnwindSafe for EncodeableExtraData<'a>
impl<'a> Send for EncodeableExtraData<'a>
impl<'a> Sync for EncodeableExtraData<'a>
impl<'a> Unpin for EncodeableExtraData<'a>
impl<'a> UnwindSafe for EncodeableExtraData<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.