use std::fmt;
use crate::append::rolling_file::LogFile;
#[cfg(feature = "config_parsing")]
use crate::config::Deserializable;
#[cfg(feature = "size_trigger")]
pub mod size;
#[cfg(feature = "time_trigger")]
pub mod time;
#[cfg(feature = "onstartup_trigger")]
pub mod onstartup;
pub trait Trigger: fmt::Debug + Send + Sync + 'static {
fn trigger(&self, file: &LogFile) -> anyhow::Result<bool>;
fn is_pre_process(&self) -> bool;
}
#[cfg(feature = "config_parsing")]
impl Deserializable for dyn Trigger {
fn name() -> &'static str {
"trigger"
}
}