pub struct Config {
pub database: Option<String>,
pub environment: Option<String>,
pub databases: HashMap<String, DatabaseConfig>,
pub project_id: Option<String>,
pub telemetry: bool,
/* private fields */
}Fields§
§database: Option<String>§environment: Option<String>§databases: HashMap<String, DatabaseConfig>§project_id: Option<String>Unique project identifier for telemetry (UUID string)
telemetry: boolWhether telemetry is enabled in config
Implementations§
Source§impl Config
impl Config
pub fn pather(&self) -> FolderPather
pub async fn new_engine(&self) -> Result<Box<dyn Engine>>
pub fn db_config(&self) -> Result<DatabaseConfig>
pub async fn load( path: &str, op: &Operator, database: Option<String>, ) -> Result<Config>
pub fn operator(&self) -> &Operator
pub async fn load_lock_file(&self, lock_file_path: &str) -> Result<LockData>
Sourcepub async fn load_variables_from_path(&self, path: &str) -> Result<Variables>
pub async fn load_variables_from_path(&self, path: &str) -> Result<Variables>
Load variables from a file path. The file type is determined by the file extension.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl !RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl !UnwindSafe for Config
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more