pub struct Parser<T> { /* private fields */ }Expand description
The config parser.
Implementations§
Source§impl<T: EnumFromStr> Parser<T>
impl<T: EnumFromStr> Parser<T>
Sourcepub fn new_with_config(config: Config) -> Self
pub fn new_with_config(config: Config) -> Self
Create a new parser with config.
Sourcepub fn parse<R: BufRead>(
&mut self,
input: R,
prefix: Option<u32>,
) -> ParseResult<T>
pub fn parse<R: BufRead>( &mut self, input: R, prefix: Option<u32>, ) -> ParseResult<T>
Parse settings.
Sourcepub fn parse_line(&mut self, line: &str, prefix: Option<u32>) -> ParseResult<T>
pub fn parse_line(&mut self, line: &str, prefix: Option<u32>) -> ParseResult<T>
Parse a single line of settings.
Sourcepub fn set_include_path<P: AsRef<Path>>(&mut self, directory: P)
pub fn set_include_path<P: AsRef<Path>>(&mut self, directory: P)
Set the directory where the include command will look for files to include.
Auto Trait Implementations§
impl<T> Freeze for Parser<T>
impl<T> RefUnwindSafe for Parser<T>where
T: RefUnwindSafe,
impl<T> Send for Parser<T>where
T: Send,
impl<T> Sync for Parser<T>where
T: Sync,
impl<T> Unpin for Parser<T>where
T: Unpin,
impl<T> UnwindSafe for Parser<T>where
T: UnwindSafe,
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