1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
pub mod with_custom_rf;
pub mod with_shared_rf;
pub use self::with_custom_rf::email::Email;
pub use self::with_shared_rf::file::File;
pub use self::with_shared_rf::http::Http;
pub use self::with_shared_rf::twitter::Twitter;
use crate::entry::Entry;
use crate::error::source::Error as SourceError;
#[derive(Debug)]
pub enum Source {
WithSharedReadFilter(with_shared_rf::Source),
WithCustomReadFilter(with_custom_rf::Source),
}
impl Source {
pub async fn get(
&mut self,
) -> Result<Vec<Entry>, SourceError> {
match self {
Source::WithSharedReadFilter(x) => x.get().await,
Source::WithCustomReadFilter(x) => x.get().await,
}
}
}