pub struct ConfigLocaFileSystem { /* private fields */ }
Expand description
A loader from the local file system which also can initialize the static scheme from local filesystem or from serialized data.
Implementations§
Source§impl ConfigLocaFileSystem
impl ConfigLocaFileSystem
Sourcepub fn new<'t>(
opt_version: Option<i64>,
init_source: ConfigInitSource<'t>,
conf_source_dir: &Path,
opt_errcol: Option<&mut Vec<(String, AnalyzerErrors)>>,
) -> Result<Self, String>
pub fn new<'t>( opt_version: Option<i64>, init_source: ConfigInitSource<'t>, conf_source_dir: &Path, opt_errcol: Option<&mut Vec<(String, AnalyzerErrors)>>, ) -> Result<Self, String>
Creates a new instance.
§Arguments
-
opt_version
- an optional static scheme version which are expectedto be found. If version is not controlled, then set to Option::None. -
init_source
- a source of the static schemes which are used to initialize the parser. For details, see ConfigInitSource. -
conf_source_dir
- a base path of the configuration to parse. -
opt_errcol
- an optional mutable reference to vector where all analyzer errors from static scheme are stored.
§Returns
A Result is returned.
-
Result::Ok is returned with the instance.
-
Result::Err an error description in returned.
Trait Implementations§
Source§impl ConfigLoaderSource for ConfigLocaFileSystem
impl ConfigLoaderSource for ConfigLocaFileSystem
Source§fn read_file(&self, path: &Path, dynenv_name: &str) -> Result<String, String>
fn read_file(&self, path: &Path, dynenv_name: &str) -> Result<String, String>
Reads file located on the
path
and attempts to use the serializator title to
load the config file. Read moreSource§fn read_raw_file(&self, path: &Path) -> Result<String, String>
fn read_raw_file(&self, path: &Path) -> Result<String, String>
Reads a content of the file without performing any deserialization or parsing. Read more
Source§fn get_serializator(
&self,
serial_name: &str,
) -> Result<Arc<DynEnvironment>, String>
fn get_serializator( &self, serial_name: &str, ) -> Result<Arc<DynEnvironment>, String>
Returns the cloned dynamic serializator instance.
Auto Trait Implementations§
impl Freeze for ConfigLocaFileSystem
impl RefUnwindSafe for ConfigLocaFileSystem
impl Send for ConfigLocaFileSystem
impl Sync for ConfigLocaFileSystem
impl Unpin for ConfigLocaFileSystem
impl UnwindSafe for ConfigLocaFileSystem
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