BitVFactory going on
This commit is contained in:
parent
d7236f05a9
commit
e771162fa7
6 changed files with 148 additions and 10 deletions
|
|
@ -13,7 +13,8 @@ use librqbit_core::Id20;
|
|||
use serde::{Deserialize, Deserializer, Serialize, Serializer};
|
||||
|
||||
use crate::{
|
||||
session::TorrentId, torrent_state::ManagedTorrentHandle, AddTorrent, AddTorrentOptions,
|
||||
bitv_factory::BitVFactory, session::TorrentId, torrent_state::ManagedTorrentHandle, AddTorrent,
|
||||
AddTorrentOptions,
|
||||
};
|
||||
|
||||
#[derive(Serialize, Deserialize, Clone)]
|
||||
|
|
@ -63,7 +64,7 @@ impl SerializedTorrent {
|
|||
|
||||
// TODO: make this info_hash first, ID-second.
|
||||
#[async_trait]
|
||||
pub trait SessionPersistenceStore: core::fmt::Debug + Send + Sync {
|
||||
pub trait SessionPersistenceStore: core::fmt::Debug + Send + Sync + BitVFactory {
|
||||
async fn next_id(&self) -> anyhow::Result<TorrentId>;
|
||||
async fn store(&self, id: TorrentId, torrent: &ManagedTorrentHandle) -> anyhow::Result<()>;
|
||||
async fn delete(&self, id: TorrentId) -> anyhow::Result<()>;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue