pub struct Config<'a> {
pub ipv4: &'a str,
pub ipv6: &'a str,
pub host: &'a str,
pub skip: bool,
pub authuser: bool,
pub trim: bool,
pub optimize: bool,
pub flush: bool,
}
Expand description
Collection of replacement strings / config flags
Fields§
§ipv4: &'a str
IPv4-parseable $remote_addr
replacement string
ipv6: &'a str
IPv6-parseable $remote_addr
replacement string
host: &'a str
$remote_addr
replacement string
skip: bool
Skip lines w/o a $remote_addr
part / first word
authuser: bool
Try to clear the authuser field
trim: bool
Trim spaces from the start of every line
optimize: bool
Don’t clear authuser fields starting with “- [” We assume these fields are already cleared.
flush: bool
Flush output after each line
Implementations§
source§impl<'a> Config<'a>
impl<'a> Config<'a>
pub fn new() -> Self
sourcepub fn get_ipv4_value(&self) -> &'a str
pub fn get_ipv4_value(&self) -> &'a str
Get IPv4 replacement value
sourcepub fn get_ipv6_value(&self) -> &'a str
pub fn get_ipv6_value(&self) -> &'a str
Get IPv6 replacement value
sourcepub fn get_host_value(&self) -> &'a str
pub fn get_host_value(&self) -> &'a str
Get string replacement value
sourcepub fn get_authuser(&self) -> bool
pub fn get_authuser(&self) -> bool
Get authuser
value
sourcepub fn get_optimize(&self) -> bool
pub fn get_optimize(&self) -> bool
Get optimize
value
sourcepub fn set_ipv4_value(&mut self, ipv4: &'a str)
pub fn set_ipv4_value(&mut self, ipv4: &'a str)
Set IPv4 replacement String
sourcepub fn set_ipv6_value(&mut self, ipv6: &'a str)
pub fn set_ipv6_value(&mut self, ipv6: &'a str)
Set IPv6 replacement String
sourcepub fn set_host_value(&mut self, host: &'a str)
pub fn set_host_value(&mut self, host: &'a str)
Set hostname
replacement String
sourcepub fn set_authuser(&mut self, b: bool)
pub fn set_authuser(&mut self, b: bool)
Set authuser
field
sourcepub fn set_optimize(&mut self, b: bool)
pub fn set_optimize(&mut self, b: bool)
Set optimize
field