pub struct ESF { /* private fields */ }Expand description
Represents a complete ESF file decoded in memory.
An ESF file contains a tree of nodes starting from a single root node. The root node is always a record node that contains all other data in the file.
§Fields
signature: Identifies the format version (CAAB, CBAB, etc.)unknown_1: Purpose unknown, typically 0creation_date: Unix timestamp or similar date valueroot_node: The top-level record node containing all file data
Implementations§
Source§impl ESF
impl ESF
Sourcepub fn signature(&self) -> &ESFSignature
pub fn signature(&self) -> &ESFSignature
Format signature identifying the ESF version (CAAB, CBAB, etc.).
Sourcepub fn unknown_1(&self) -> &u32
pub fn unknown_1(&self) -> &u32
Unknown header field, typically 0. May be reserved for future use.
Sourcepub fn creation_date(&self) -> &u32
pub fn creation_date(&self) -> &u32
Creation timestamp of the ESF file.
Source§impl ESF
impl ESF
Sourcepub fn set_signature(&mut self, val: ESFSignature) -> &mut Self
pub fn set_signature(&mut self, val: ESFSignature) -> &mut Self
Format signature identifying the ESF version (CAAB, CBAB, etc.).
Sourcepub fn set_unknown_1(&mut self, val: u32) -> &mut Self
pub fn set_unknown_1(&mut self, val: u32) -> &mut Self
Unknown header field, typically 0. May be reserved for future use.
Sourcepub fn set_creation_date(&mut self, val: u32) -> &mut Self
pub fn set_creation_date(&mut self, val: u32) -> &mut Self
Creation timestamp of the ESF file.
Sourcepub fn set_root_node(&mut self, val: NodeType) -> &mut Self
pub fn set_root_node(&mut self, val: NodeType) -> &mut Self
Root node of the node tree containing all ESF data. This is always a record node in valid ESF files.
Source§impl ESF
impl ESF
Sourcepub fn clone_without_root_node(&self) -> Self
pub fn clone_without_root_node(&self) -> Self
Creates a shallow copy of this ESF with the root node replaced by Invalid.
This is useful when you need to preserve the header metadata (signature, creation date, etc.) but want to rebuild or replace the node tree.
Trait Implementations§
Source§impl Decodeable for ESF
impl Decodeable for ESF
Source§impl<'de> Deserialize<'de> for ESF
impl<'de> Deserialize<'de> for ESF
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Encodeable for ESF
impl Encodeable for ESF
Source§fn encode<W: WriteBytes>(
&mut self,
buffer: &mut W,
extra_data: &Option<EncodeableExtraData<'_>>,
) -> Result<()>
fn encode<W: WriteBytes>( &mut self, buffer: &mut W, extra_data: &Option<EncodeableExtraData<'_>>, ) -> Result<()>
impl StructuralPartialEq for ESF
Auto Trait Implementations§
impl Freeze for ESF
impl RefUnwindSafe for ESF
impl Send for ESF
impl Sync for ESF
impl Unpin for ESF
impl UnsafeUnpin for ESF
impl UnwindSafe for ESF
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 more§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().§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§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).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.