Enum bip_disk::IDiskMessage [] [src]

pub enum IDiskMessage {
    AddTorrent(MetainfoFile),
    RemoveTorrent(InfoHash),
    SyncTorrent(InfoHash),
    LoadBlock(BlockMut),
    ProcessBlock(Block),
}

Messages that can be sent to the DiskManager.

Variants

Message to add a torrent to the disk manager.

Message to remove a torrent from the disk manager.

Note, this will NOT remove any data from the FileSystem, and as an added convenience, this message will also trigger a IDiskMessage::SyncTorrent message.

Message to tell the FileSystem to sync the torrent.

This message will trigger a call to FileSystem::sync for every file in the torrent, so the semantics will differ depending on the FileSystem in use.

In general, if a torrent has finished downloading, but will be kept in the DiskManager to, for example, seed the torrent, then this message should be sent, otherwise, IDiskMessage::RemoveTorrent is sufficient.

Message to load the given block in to memory.

Message to process the given block and persist it.

Trait Implementations

impl Debug for IDiskMessage
[src]

Formats the value using the given formatter.