net_parser_rs/flow/layer2/mod.rs
1pub mod ethernet;
2
3use crate::flow::Flow;
4use crate::flow::errors::Error;
5
6pub trait FlowExtraction {
7 fn extract_flow(&self) -> Result<Flow, Error>;
8}
9
10pub mod errors {
11 use crate::flow::layer2::ethernet;
12 use thiserror::{Error as ThisError};
13
14 #[derive(Debug, ThisError)]
15 pub enum Error {
16 #[error("Ethernet Error")]
17 Ethernet(#[from] ethernet::errors::Error),
18 }
19
20 unsafe impl Sync for Error {}
21 unsafe impl Send for Error {}
22}