Trait bip_metainfo::Accessor
[−]
[src]
pub trait Accessor { fn access_directory(&self) -> Option<&Path>; fn access_metadata<C>(&self, callback: C) -> Result<()>
where
C: FnMut(u64, &Path); fn access_pieces<C>(&self, callback: C) -> Result<()>
where
C: for<'a> FnMut(PieceAccess<'a>) -> Result<()>; }
Trait for accessing the data used to construct a torrent file.
Required Methods
fn access_directory(&self) -> Option<&Path>
Access the directory that all files should be relative to.
fn access_metadata<C>(&self, callback: C) -> Result<()> where
C: FnMut(u64, &Path),
C: FnMut(u64, &Path),
Access the metadata for all files including their length and path.
fn access_pieces<C>(&self, callback: C) -> Result<()> where
C: for<'a> FnMut(PieceAccess<'a>) -> Result<()>,
C: for<'a> FnMut(PieceAccess<'a>) -> Result<()>,
Access the sequential pieces that make up all of the files.
Implementors
impl<'a, T> Accessor for &'a T where
T: Accessor,impl Accessor for FileAccessor
impl<'a> Accessor for DirectAccessor<'a>
impl Accessor for Info