1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
extern crate serde_derive; use torrent::Torrent; use self::serde_derive::{Deserialize, Serialize}; #[derive(Clone, Serialize, Deserialize, Debug)] pub struct Torrents { torrent_results: Vec<Torrent>, } impl Torrents { /// Return a list of torrents. pub fn torrents(&self) -> &Vec<Torrent> { &self.torrent_results } }