mod async_event;
mod event_input;
mod json;
mod plugin_event;
pub use async_event::AsyncEvent;
pub use event_input::EventInput;
use falco_event::fields::{FromBytes, ToBytes};
pub use json::JsonPayload;
pub use plugin_event::PluginEvent;
use std::fmt::Debug;
pub trait EventSource {
const SOURCE: Option<&'static str>;
}
impl EventSource for &[u8] {
const SOURCE: Option<&'static str> = None;
}
#[derive(falco_event::AnyEvent)]
#[allow(missing_docs)]
pub enum AnyPluginEvent<'a, P, A>
where
for<'b> P: EventSource + ToBytes + FromBytes<'b> + Debug,
A: EventSource + ToBytes + FromBytes<'a> + Debug,
{
Plugin(PluginEvent<P>),
Async(AsyncEvent<'a, A>),
}