pub struct Parser { /* private fields */ }Expand description
Parser for ModSecurity configuration files.
Implementations§
Source§impl Parser
impl Parser
Sourcepub fn parse_with_location(
&mut self,
input: &str,
file: Option<&Path>,
) -> Result<()>
pub fn parse_with_location( &mut self, input: &str, file: Option<&Path>, ) -> Result<()>
Parse a configuration string with file location.
Sourcepub fn parse_file(&mut self, path: &Path) -> Result<()>
pub fn parse_file(&mut self, path: &Path) -> Result<()>
Parse a configuration file.
Sourcepub fn parse_glob(&mut self, pattern: &str) -> Result<()>
pub fn parse_glob(&mut self, pattern: &str) -> Result<()>
Parse files matching a glob pattern.
Sourcepub fn into_directives(self) -> Vec<Directive>
pub fn into_directives(self) -> Vec<Directive>
Get the parsed directives.
Sourcepub fn directives(&self) -> &[Directive]
pub fn directives(&self) -> &[Directive]
Get a reference to the parsed directives.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Parser
impl RefUnwindSafe for Parser
impl Send for Parser
impl Sync for Parser
impl Unpin for Parser
impl UnwindSafe for Parser
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