Struct irx_config::parsers::FileParserBuilder
source · pub struct FileParserBuilder<L: Load + Default> { /* private fields */ }
Expand description
Builder for FileParser
.
Implementations§
source§impl<L: Load + Default + Clone> FileParserBuilder<L>
impl<L: Load + Default + Clone> FileParserBuilder<L>
sourcepub fn default_path<VALUE: Into<PathBuf>>(&mut self, value: VALUE) -> &mut Self
pub fn default_path<VALUE: Into<PathBuf>>(&mut self, value: VALUE) -> &mut Self
Set default path to the file to be parsed.
sourcepub fn path_option<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn path_option<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
Set path option name which could be used to get path value from previous parsing Value
results.
sourcepub fn keys_delimiter<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn keys_delimiter<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
Set delimiter used to separate keys levels in path value. Default is DEFAULT_KEYS_SEPARATOR
.
sourcepub fn ignore_missing_file<VALUE: Into<bool>>(
&mut self,
value: VALUE
) -> &mut Self
pub fn ignore_missing_file<VALUE: Into<bool>>( &mut self, value: VALUE ) -> &mut Self
If file does not exists do not try to load it. The default Value
will be returned. Default is false
.
sourcepub fn loader<VALUE: Into<L>>(&mut self, value: VALUE) -> &mut Self
pub fn loader<VALUE: Into<L>>(&mut self, value: VALUE) -> &mut Self
Set the loader structure which implements Load
trait.
sourcepub fn build(&self) -> Result<FileParser<L>, FileParserBuilderError>
pub fn build(&self) -> Result<FileParser<L>, FileParserBuilderError>
Trait Implementations§
Auto Trait Implementations§
impl<L> RefUnwindSafe for FileParserBuilder<L>where
L: RefUnwindSafe,
impl<L> Send for FileParserBuilder<L>where
L: Send,
impl<L> Sync for FileParserBuilder<L>where
L: Sync,
impl<L> Unpin for FileParserBuilder<L>where
L: Unpin,
impl<L> UnwindSafe for FileParserBuilder<L>where
L: 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