[][src]Struct cpclib_disc::amsdos::AmsdosEntries

pub struct AmsdosEntries { /* fields omitted */ }

Encode the catalog of an existing disc

Methods

impl AmsdosEntries[src]

pub fn to_amsdos_catalog(&self) -> AmsdosCatalog[src]

Generate a catalog that is more user friendly

pub fn entry_index(&self, entry: &AmsdosEntry) -> Option<usize>[src]

Return the index of the entry

pub fn track(&self, entry: &AmsdosEntry) -> Option<u8>[src]

Return the track that contains the entry

pub fn sector(&self, entry: &AmsdosEntry) -> Option<u8>[src]

pub fn get_entry_mut(&mut self, idx: usize) -> &mut AmsdosEntry[src]

pub fn as_bytes(&self) -> [u8; 2048][src]

Generate a binary version that can be used to export the catalog

pub fn from_slice(slice: &[u8]) -> Self[src]

Manually create the catalog from a byte slice. Usefull to manipulate catarts

pub fn all_entries(&self) -> impl Iterator<Item = &AmsdosEntry>[src]

Returns all the entries of the catalog

pub fn visible_entries(&self) -> impl Iterator<Item = &AmsdosEntry>[src]

Returns an iterator on the visible entries : they are not erased and are not system entries

pub fn without_erased_entries(&self) -> impl Iterator<Item = &AmsdosEntry>[src]

Returns an iterator on the entries not erased

pub fn used_entries(&self) -> impl Iterator<Item = &AmsdosEntry>[src]

pub fn free_entries(&self) -> impl Iterator<Item = &AmsdosEntry>[src]

Returns entries erased

pub fn for_file(
    &self,
    filename: &AmsdosFileName
) -> impl Iterator<Item = &AmsdosEntry>
[src]

Return all the entries that correspond to a given file

pub fn one_empty_entry(&self) -> Option<&AmsdosEntry>[src]

Returns one available entry or None if there is no entry

pub fn available_blocs(&self) -> Vec<BlocIdx>[src]

Returns the blocs that are not referenced in the catalog. Bloc used in erased files are returned (so they may be broken)

pub fn one_empty_bloc(&self) -> Option<BlocIdx>[src]

Returns one available bloc or None if there is no entry

Trait Implementations

impl Debug for AmsdosEntries[src]

impl<'_> From<&'_ AmsdosEntries> for AmsdosCatalog[src]

impl PartialEq<AmsdosEntries> for AmsdosEntries[src]

impl StructuralPartialEq for AmsdosEntries[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.