[][src]Struct pmd_farc::Farc

pub struct Farc<F: Read + Seek> { /* fields omitted */ }

A parser for a file in the farc format (see the crate root documentation for more information)

Methods

impl<F: Read + Seek> Farc<F>[src]

pub fn new(file: F) -> Result<Self, FarcError>[src]

Create and parse a new Farc object, with the specified input file

pub fn file_count(&self) -> usize[src]

return the number of file contained in this Farc file

pub fn file_count_hashed(&self) -> usize[src]

return the number of file with an unknown name in this Farc file

pub fn file_count_named(&self) -> usize[src]

return the number of file with a known name in this Farc file

pub fn iter_name(&self) -> IntoIter<&String>[src]

iter over the known name of file

pub fn iter_hash(&self) -> IntoIter<u32>[src]

iter over all the hash without an occording known name

pub fn get_named_file(&self, name: &str) -> Result<PartitionMutex<F>, FarcError>[src]

Return an handle to a file stored in this Farc, from it's name. It will hash the name as necessary.

pub fn get_unnamed_file(
    &self,
    hash: u32
) -> Result<PartitionMutex<F>, FarcError>
[src]

Return an handle to a file with an unknown name. It won't search for file a known name, as opposed to get_named_file

pub fn check_file_name(&mut self, name: &str) -> bool[src]

Check if the file name correspond to an hash. If it is the case, it replace the hash with name.

pub fn check_file_name_iter<T: Iterator<Item = String>>(&mut self, iter: T)[src]

Call check_file_name repeteatelly with an iterator

Trait Implementations

impl<F: Debug + Read + Seek> Debug for Farc<F>[src]

Auto Trait Implementations

impl<F> RefUnwindSafe for Farc<F>

impl<F> Send for Farc<F> where
    F: Send

impl<F> Sync for Farc<F> where
    F: Send

impl<F> Unpin for Farc<F>

impl<F> UnwindSafe for Farc<F>

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.