Struct lava_torrent::torrent::v1::File [] [src]

pub struct File {
    pub length: Integer,
    pub path: PathBuf,
    pub extra_fields: Option<Dictionary>,
}

A file contained in a torrent.

Modeled after the specifications in BEP 3. Unknown/extension fields will be placed in extra_fields. If you need any of those extra fields you would have to parse it yourself.

Fields

File size in bytes.

File path, relative to Torrent's name field.

Fields not defined in BEP 3.

Methods

impl File
[src]

[src]

Construct the File's absolute path using parent.

Caller has to ensure that parent is an absolute path. Otherwise an error would be returned.

This method effectively appends/joins self.path to parent.

Trait Implementations

impl Clone for File
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for File
[src]

[src]

Formats the value using the given formatter. Read more

impl Eq for File
[src]

impl PartialEq for File
[src]

[src]

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

[src]

This method tests for !=.

impl Display for File
[src]

[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for File

impl Sync for File