Skip to content

Commit

Permalink
⚡ Add shorthand for SolidEntry header information
Browse files Browse the repository at this point in the history
  • Loading branch information
ChanTsune committed Nov 21, 2024
1 parent 079112a commit 0095b41
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions lib/src/entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,24 @@ impl<T> SolidEntry<T> {
&self.header
}

/// Compression method of the solid entry.
#[inline]
pub const fn compression(&self) -> Compression {
self.header.compression
}

/// Encryption method of the solid entry.
#[inline]
pub const fn encryption(&self) -> Encryption {
self.header.encryption
}

/// Cipher mode of the solid entry's encryption method.
#[inline]
pub const fn cipher_mode(&self) -> CipherMode {
self.header.cipher_mode
}

/// Extra chunks.
#[inline]
pub fn extra_chunks(&self) -> &[RawChunk<T>] {
Expand Down

0 comments on commit 0095b41

Please sign in to comment.