pub enum Section<'input> {
BlankLine,
Comment(&'input str),
Global {
comment: Option<&'input str>,
lines: Vec<Line<'input>>,
},
Default {
comment: Option<&'input str>,
proxy: Option<&'input str>,
lines: Vec<Line<'input>>,
},
Frontend {
comment: Option<&'input str>,
proxy: &'input str,
lines: Vec<Line<'input>>,
header_addr: Option<(AddressRef<'input>, Option<&'input str>)>,
},
Listen {
comment: Option<&'input str>,
proxy: &'input str,
lines: Vec<Line<'input>>,
header_addr: Option<(AddressRef<'input>, Option<&'input str>)>,
},
Backend {
comment: Option<&'input str>,
proxy: &'input str,
lines: Vec<Line<'input>>,
},
Userlist {
comment: Option<&'input str>,
name: &'input str,
lines: Vec<Line<'input>>,
},
UnknownLine {
line: &'input str,
},
}Expand description
Parsed haproxy config preserving the order and comments.
Does not support conditional blocks,
these and other unsupported lines will be stored in the UnknownLine variant.
Information outside the header is containd in the correct order in the lines member. See the Line documentation.
Variants§
BlankLine
Comment(&'input str)
Comment on a seperate line not in a section
Global
The global section of a config.
Fields
Default
The lines in the default section of a config.
Fields
Frontend
Fields
§
header_addr: Option<(AddressRef<'input>, Option<&'input str>)>Optional address to which the frontend binds can be stated
in the header, for example frontend webserver *:80 instead
of a bind line, any optional config for the bind follows
Listen
Fields
§
header_addr: Option<(AddressRef<'input>, Option<&'input str>)>Optional address to which the listen binds can be stated
in the header, for example frontend webserver *:80 instead
of a bind line, any optional config for the bind follows
Backend
Fields
Userlist
Fields
UnknownLine
Trait Implementations§
Auto Trait Implementations§
impl<'input> Freeze for Section<'input>
impl<'input> RefUnwindSafe for Section<'input>
impl<'input> Send for Section<'input>
impl<'input> Sync for Section<'input>
impl<'input> Unpin for Section<'input>
impl<'input> UnwindSafe for Section<'input>
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