Trait bip_metainfo::Accessor [] [src]

pub trait Accessor {
    fn access_directory(&self) -> Option<&str>;
    fn access_metadata<C>(&self, callback: C) -> Result<()> where C: FnMut(u64, &Path);
    fn access_pieces<C>(&self, callback: C) -> Result<()> where C: FnMut(&mut Read) -> Result<()>;
}

Trait for accessing the data used to construct a torrent file.

Required Methods

Access the directory that all files should be relative to.

Access the metadata for all files including their length and path.

Access the sequential pieces that make up all of the files.

Implementors