Struct bip_metainfo::InfoBuilder
[−]
[src]
pub struct InfoBuilder<'a> { /* fields omitted */ }
Builder for generating an info dictionary file from some accessor.
Methods
impl<'a> InfoBuilder<'a>
[src]
fn new() -> InfoBuilder<'a>
[src]
fn set_private_flag(self, opt_is_private: Option<bool>) -> InfoBuilder<'a>
[src]
Set or unset the private flag for the torrent file.
fn set_piece_length(self, piece_length: PieceLength) -> InfoBuilder<'a>
[src]
Sets the piece length for the torrent file.
fn build<A, C>(
self,
threads: usize,
accessor: A,
progress: C
) -> ParseResult<Vec<u8>> where
A: IntoAccessor,
C: FnMut(f64) + Send + 'static,
[src]
self,
threads: usize,
accessor: A,
progress: C
) -> ParseResult<Vec<u8>> where
A: IntoAccessor,
C: FnMut(f64) + Send + 'static,
Build the metainfo file from the given accessor and the number of worker threads.
Panics if threads is equal to zero.