pub struct DirectoryNode {
pub name: String,
pub offset: u64,
pub size: u64,
pub flags: u32,
}Expand description
Directory node in the bundle
Represents a node in the bundle’s internal directory structure, which can be either a file or a directory.
Fields§
§name: StringNode name
offset: u64Offset in the bundle
size: u64Size of the data
flags: u32Flags (indicates file type, compression, etc.)
Implementations§
Source§impl DirectoryNode
impl DirectoryNode
Sourcepub fn new(name: String, offset: u64, size: u64, flags: u32) -> DirectoryNode
pub fn new(name: String, offset: u64, size: u64, flags: u32) -> DirectoryNode
Create a new DirectoryNode
Sourcepub fn is_directory(&self) -> bool
pub fn is_directory(&self) -> bool
Check if this node represents a directory
Sourcepub fn is_compressed(&self) -> bool
pub fn is_compressed(&self) -> bool
Check if this node’s data is compressed
Sourcepub fn end_offset(&self) -> u64
pub fn end_offset(&self) -> u64
Get the end offset of this node
Trait Implementations§
Source§impl Clone for DirectoryNode
impl Clone for DirectoryNode
Source§fn clone(&self) -> DirectoryNode
fn clone(&self) -> DirectoryNode
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DirectoryNode
impl Debug for DirectoryNode
Source§impl Default for DirectoryNode
impl Default for DirectoryNode
Source§fn default() -> DirectoryNode
fn default() -> DirectoryNode
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for DirectoryNode
impl<'de> Deserialize<'de> for DirectoryNode
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<DirectoryNode, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<DirectoryNode, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for DirectoryNode
impl Serialize for DirectoryNode
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for DirectoryNode
impl RefUnwindSafe for DirectoryNode
impl Send for DirectoryNode
impl Sync for DirectoryNode
impl Unpin for DirectoryNode
impl UnwindSafe for DirectoryNode
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
Source§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>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().