pub struct DbTorrentRepository { /* private fields */ }
Implementations§
source§impl DbTorrentRepository
impl DbTorrentRepository
pub fn new(database: Arc<Box<dyn Database>>) -> Self
sourcepub async fn get_by_info_hash(
&self,
info_hash: &InfoHash
) -> Result<Torrent, Error>
pub async fn get_by_info_hash( &self, info_hash: &InfoHash ) -> Result<Torrent, Error>
It finds the torrent by info-hash.
Errors
This function will return an error there is a database error.
Auto Trait Implementations§
impl !RefUnwindSafe for DbTorrentRepository
impl Send for DbTorrentRepository
impl Sync for DbTorrentRepository
impl Unpin for DbTorrentRepository
impl !UnwindSafe for DbTorrentRepository
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more