Struct ConfigLocaFileSystem

Source
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

Source

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.

Trait Implementations§

Source§

impl ConfigLoaderSource for ConfigLocaFileSystem

Source§

fn is_local(&self) -> bool

Returns true if loaded from local file system.
Source§

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 more
Source§

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>

Returns the cloned dynamic serializator instance.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.