pub struct SolidEntry<T = Vec<u8>> { /* private fields */ }Expand description
A solid mode entry.
Implementations§
Source§impl<T> SolidEntry<T>
impl<T> SolidEntry<T>
Sourcepub fn header(&self) -> &SolidHeader
pub fn header(&self) -> &SolidHeader
Returns solid mode information header reference.
Sourcepub fn extra_chunks(&self) -> &[RawChunk<T>]
pub fn extra_chunks(&self) -> &[RawChunk<T>]
Extra chunks.
Source§impl<T: AsRef<[u8]>> SolidEntry<T>
impl<T: AsRef<[u8]>> SolidEntry<T>
Sourcepub fn entries(
&self,
password: Option<&str>,
) -> Result<impl Iterator<Item = Result<NormalEntry>> + '_>
pub fn entries( &self, password: Option<&str>, ) -> Result<impl Iterator<Item = Result<NormalEntry>> + '_>
Returns an iterator over the entries in the SolidEntry.
§Example
§Example
use libpna::{Archive, ReadEntry, ReadOptions};
use std::fs;
let file = fs::File::open("foo.pna")?;
let mut archive = Archive::read_header(file)?;
for entry in archive.entries() {
match entry? {
ReadEntry::Solid(solid_entry) => {
for entry in solid_entry.entries(Some("password"))? {
let entry = entry?;
let mut reader = entry.reader(ReadOptions::builder().build());
// fill your code
}
}
ReadEntry::Normal(entry) => {
// fill your code
}
}
}Trait Implementations§
Source§impl<T: Clone> Clone for SolidEntry<T>
impl<T: Clone> Clone for SolidEntry<T>
Source§fn clone(&self) -> SolidEntry<T>
fn clone(&self) -> SolidEntry<T>
Returns a copy 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<T: Debug> Debug for SolidEntry<T>
impl<T: Debug> Debug for SolidEntry<T>
Source§impl<'a> From<SolidEntry<&'a [u8]>> for SolidEntry<Vec<u8>>
impl<'a> From<SolidEntry<&'a [u8]>> for SolidEntry<Vec<u8>>
Source§fn from(value: SolidEntry<&'a [u8]>) -> Self
fn from(value: SolidEntry<&'a [u8]>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<SolidEntry<&'a [u8]>> for SolidEntry<Cow<'a, [u8]>>
impl<'a> From<SolidEntry<&'a [u8]>> for SolidEntry<Cow<'a, [u8]>>
Source§fn from(value: SolidEntry<&'a [u8]>) -> Self
fn from(value: SolidEntry<&'a [u8]>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<SolidEntry<Cow<'a, [u8]>>> for SolidEntry<Vec<u8>>
impl<'a> From<SolidEntry<Cow<'a, [u8]>>> for SolidEntry<Vec<u8>>
Source§impl<T> From<SolidEntry<T>> for ReadEntry<T>
impl<T> From<SolidEntry<T>> for ReadEntry<T>
Source§fn from(value: SolidEntry<T>) -> Self
fn from(value: SolidEntry<T>) -> Self
Converts to this type from the input type.
Source§impl From<SolidEntry> for SolidEntry<Cow<'_, [u8]>>
impl From<SolidEntry> for SolidEntry<Cow<'_, [u8]>>
Source§impl<T: Hash> Hash for SolidEntry<T>
impl<T: Hash> Hash for SolidEntry<T>
Source§impl<T: Ord> Ord for SolidEntry<T>
impl<T: Ord> Ord for SolidEntry<T>
Source§fn cmp(&self, other: &SolidEntry<T>) -> Ordering
fn cmp(&self, other: &SolidEntry<T>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<T: PartialEq> PartialEq for SolidEntry<T>
impl<T: PartialEq> PartialEq for SolidEntry<T>
Source§impl<T: PartialOrd> PartialOrd for SolidEntry<T>
impl<T: PartialOrd> PartialOrd for SolidEntry<T>
impl<T> Entry for SolidEntry<T>where
SolidEntry<T>: SealedEntryExt,
impl<T: Eq> Eq for SolidEntry<T>
impl<T> StructuralPartialEq for SolidEntry<T>
Auto Trait Implementations§
impl<T> Freeze for SolidEntry<T>
impl<T> RefUnwindSafe for SolidEntry<T>where
T: RefUnwindSafe,
impl<T> Send for SolidEntry<T>where
T: Send,
impl<T> Sync for SolidEntry<T>where
T: Sync,
impl<T> Unpin for SolidEntry<T>where
T: Unpin,
impl<T> UnwindSafe for SolidEntry<T>where
T: UnwindSafe,
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