Struct bip_metainfo::Info [] [src]

pub struct Info { /* fields omitted */ }

Contains directory and checksum data for a torrent file.

Methods

impl Info
[src]

Read an Info from info dictionary bytes.

Hash to uniquely identify this torrent.

Some file directory if this is a multi-file torrent, otherwise None.

If you want to check to see if this is a multi-file torrent, you should check whether or not this returns Some. Checking the number of files present is NOT the correct method.

Length in bytes of each piece.

Whether or not the torrent is private.

Iterator over each of the pieces SHA-1 hash.

Ordering of pieces yielded in the iterator is guaranteed to be the order in which they are found in the torrent file as this is necessary to refer to pieces by their index to other peers.

Iterator over each file within the torrent file.

Ordering of files yielded in the iterator is guaranteed to be the order in which they are found in the torrent file as this is necessary to reconstruct pieces received from peers.

Retrieve the bencoded bytes for the Info dictionary.

Trait Implementations

impl Debug for Info
[src]

Formats the value using the given formatter.

impl Clone for Info
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Eq for Info
[src]

impl PartialEq for Info
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl IntoAccessor for Info
[src]

Concrete Accessor type that will be converted into.

Convert the type into some Accessor as a Result.

impl<'a> IntoAccessor for &'a Info
[src]

Concrete Accessor type that will be converted into.

Convert the type into some Accessor as a Result.

impl Accessor for Info
[src]

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.