Skip to main content

IsoImage

Struct IsoImage 

Source
pub struct IsoImage<DATA: Seek> { /* private fields */ }
Available on crate features alloc and sync only.
Expand description

A struct representing an open ISO9660 Image

This struct is interior mutable.

Implementations§

Source§

impl<DATA: Seek> IsoImage<DATA>

Source

pub fn into_inner(self) -> DATA

Consumes the image handle and returns its underlying data source.

Source§

impl<DATA: Read + Seek> IsoImage<DATA>

Source

pub fn open(data: DATA) -> Result<Self>

Opens a ISO9660 Image

Source

pub fn read_bytes_at(&self, byte_offset: u64, buf: &mut [u8]) -> Result<()>

Read raw bytes from an absolute byte position in the image.

Source

pub fn find_path(&self, path: &str) -> Result<Option<DirEntry>>

Finds an entry by a slash- or backslash-delimited path.

Leading and repeated separators and . components are ignored. The root itself has no directory entry, so an empty or root-only path returns None. Parent (..) components are rejected.

Source

pub fn read_file(&self, entry: &DirEntry) -> Result<Vec<u8>>

Read the complete contents of a file, handling multi-extent files.

For single-extent files, this reads from the entry’s extent. For multi-extent files (using NOT_FINAL flag), this reads and concatenates all extents in order.

Source§

impl<DATA: Read + Seek> IsoImage<DATA>

Source

pub fn root_dir(&self) -> RootDir

Performs the root_dir operation.

Source

pub fn root_dirs(&self) -> &RootDirs

Performs the root_dirs operation.

Source

pub fn supports_rrip(&self) -> bool

Returns whether RRIP (Rock Ridge) extensions were detected in the image.

Source

pub fn has_evd(&self) -> bool

Returns whether an ISO 9660:1999 Enhanced Volume Descriptor was found.

Source

pub fn open_dir(&self, dir_ref: DirectoryRef) -> IsoDir<'_, DATA>

Open a directory by its DirectoryRef, enabling navigation into subdirectories.

Source

pub fn path_table(&self) -> PathTableInfo

Returns the path table information for this image.

Source

pub fn read_volume_descriptors(&self) -> VolumeDescriptorIter<'_, DATA>

Creates a volume-descriptor cursor starting at logical sector 16.

Async callers use VolumeDescriptorIter::next_descriptor. In sync builds the cursor also implements Iterator.

Source

pub fn path_table_entries(&self) -> &[PathTableEntry]

Returns the cached path table entries, parsed once during open().

Each entry contains a directory name, its LBA, and its parent index, enabling fast directory hierarchy traversal without repeated seeks.

Source§

impl<DATA: Read + Seek> IsoImage<DATA>

Source

pub fn read_pvd(&self) -> Result<PrimaryVolumeDescriptor>

Reads the primary volume descriptor.

Returns an I/O error if the descriptor sequence is malformed, truncated, or contains no primary descriptor.

Trait Implementations§

Source§

impl<DATA: Debug + Seek> Debug for IsoImage<DATA>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<DATA> !Freeze for IsoImage<DATA>

§

impl<DATA> !RefUnwindSafe for IsoImage<DATA>

§

impl<DATA> Send for IsoImage<DATA>
where Mutex<IsoCursor<DATA>>: Send,

§

impl<DATA> Sync for IsoImage<DATA>
where Mutex<IsoCursor<DATA>>: Sync,

§

impl<DATA> Unpin for IsoImage<DATA>
where Mutex<IsoCursor<DATA>>: Unpin,

§

impl<DATA> UnsafeUnpin for IsoImage<DATA>
where Mutex<IsoCursor<DATA>>: UnsafeUnpin,

§

impl<DATA> UnwindSafe for IsoImage<DATA>
where Mutex<IsoCursor<DATA>>: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more