pub struct Config {
pub input: Vec<InputConfig>,
pub sort: SortConfig,
pub filter: FilterConfig,
pub output: Vec<OutputConfig>,
pub transform: TransformConfig,
pub export: ExportConfig,
pub replay: ReplayConfig,
}Expand description
Top-level configuration loaded from a TOML file.
Fields§
§input: Vec<InputConfig>Input PCAP files (supports glob patterns).
sort: SortConfigSorting options.
filter: FilterConfigPacket filter options.
output: Vec<OutputConfig>Output targets.
transform: TransformConfigPacket-level transformation options.
export: ExportConfigStructured data export options.
replay: ReplayConfigLive replay options.
Implementations§
Source§impl Config
impl Config
Sourcepub fn from_file(path: &Path) -> Result<Self, ConfigError>
pub fn from_file(path: &Path) -> Result<Self, ConfigError>
Load configuration from a TOML file at path.
§Errors
Returns ConfigError on I/O failure or TOML parse / deserialise error.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
Source§fn deserialize(value: &mut Value<'de>) -> Result<Self, DeserError>
fn deserialize(value: &mut Value<'de>) -> Result<Self, DeserError>
Given a mutable
Value, allows you to deserialize the type from it,
or accumulate 1 or more errorsAuto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more