On 2024-04-03 12:46, Max Carrara wrote:
>> +
>> +#[derive(Clone, Debug)]
>> +#[cfg_attr(test, derive(Eq, PartialEq))]
>> +pub enum IcmpType {
>> +Numeric(u8),
>> +Named(&'static str),
>> +}
>> +
>> +// MUST BE SORTED!
>
> Should maaaybe note that it must be sorted for binary search, not
On 4/3/24 12:46, Max Carrara wrote:
> Hmm, since this is only used below, IMO it's fine that this returns a
> tuple like that on `Ok` - but should functions like that be used in
> multiple places, it might be beneficial to use a type alias or even a
> tuple struct for readability's sake.
Yes, I fi
On Tue Apr 2, 2024 at 7:16 PM CEST, Stefan Hanreich wrote:
> Additionally we implement FromStr for all rule types and parts, which
> can be used for parsing firewall config rules. Initial rule parsing
> works by parsing the different options into a HashMap and only then
> de-serializing a struct fr
Additionally we implement FromStr for all rule types and parts, which
can be used for parsing firewall config rules. Initial rule parsing
works by parsing the different options into a HashMap and only then
de-serializing a struct from the parsed options.
This intermediate step makes rule parsing a