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
use std::error::Error;
use std::fmt;
use std::path::Path;
#[cfg(feature = "file")]
use file::Deserializable;
#[cfg(feature = "delete_roller")]
pub mod delete;
#[cfg(feature = "fixed_window_roller")]
pub mod fixed_window;
pub trait Roll: fmt::Debug + Send + Sync + 'static {
fn roll(&self, file: &Path) -> Result<(), Box<Error + Sync + Send>>;
}
#[cfg(feature = "file")]
impl Deserializable for Roll {
fn name() -> &'static str {
"roller"
}
}