Struct bip_metainfo::DirectAccessor [] [src]

pub struct DirectAccessor<'a> {
    // some fields omitted
}

Accessor that pulls data in directly from memory.

Methods

impl<'a> DirectAccessor<'a>
[src]

fn new(file_name: &'a str, file_contents: &'a [u8]) -> DirectAccessor<'a>

Create a new DirectAccessor from the given file name and contents.

Trait Implementations

impl<'a> IntoAccessor for DirectAccessor<'a>
[src]

type Accessor = DirectAccessor<'a>

Concrete Accessor type that will be converted into.

fn into_accessor(self) -> Result<DirectAccessor<'a>>

Convert the type into some Accessor as a Result.

impl<'a> Accessor for DirectAccessor<'a>
[src]

fn access_directory(&self) -> Option<&str>

Access the directory that all files should be relative to.

fn access_metadata<C>(&self, callback: C) -> Result<()> where 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: FnMut(&mut Read) -> Result<()>

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