[−][src]Struct cpclib_disc::amsdos::AmsdosEntries
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]
&self,
filename: &AmsdosFileName
) -> impl Iterator<Item = &AmsdosEntry>
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]
fn from(entries: &AmsdosEntries) -> Self
[src]
impl PartialEq<AmsdosEntries> for AmsdosEntries
[src]
fn eq(&self, other: &AmsdosEntries) -> bool
[src]
fn ne(&self, other: &AmsdosEntries) -> bool
[src]
impl StructuralPartialEq for AmsdosEntries
[src]
Auto Trait Implementations
impl RefUnwindSafe for AmsdosEntries
impl Send for AmsdosEntries
impl Sync for AmsdosEntries
impl Unpin for AmsdosEntries
impl UnwindSafe for AmsdosEntries
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,