Struct pmd_farc::Farc [−][src]
A parser for a file in the farc format (see the crate root documentation for more information)
Implementations
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
#[must_use]pub fn file_count(&self) -> usize
[src]
return the number of file contained in this Farc
file
#[must_use]pub fn file_unknown_name(&self) -> usize
[src]
return the number of file with an unknown name in this Farc
file
#[must_use]pub fn file_known_name(&self) -> usize
[src]
return the number of file with a known name in this Farc
file
pub fn iter_name(&self) -> impl Iterator<Item = &String>
[src]
iter over the known name of file
pub fn iter_hash_unknown_name(&self) -> impl Iterator<Item = &u32>
[src]
iter over all the hash without an occording known name
pub fn iter(&self) -> impl Iterator<Item = (u32, Option<&String>)>
[src]
iterate over all the known file, with their hash and (optionaly) their name.
pub fn iter_all_hash(&self) -> impl Iterator<Item = &u32>
[src]
Iter over all the hash
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_hashed_file(&self, hash: u32) -> Result<PartitionMutex<F>, FarcError>
[src]
Return an handle to a file, whether its name is known or not.
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
Auto Trait Implementations
impl<F> RefUnwindSafe for Farc<F>
impl<F> Send for Farc<F> where
F: Send,
F: Send,
impl<F> Sync for Farc<F> where
F: Send,
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]
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,
pub 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.
pub 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>,