pub struct ResolvedRuntimeConfig<T> {
pub runtime_config: T,
pub key_value_resolver: RuntimeConfigResolver,
pub sqlite_resolver: RuntimeConfigResolver,
pub state_dir: Option<PathBuf>,
pub log_dir: Option<PathBuf>,
pub toml: Table,
}
Expand description
A runtime configuration which has been resolved from a runtime config source.
Includes other pieces of configuration that are used to resolve the runtime configuration.
Fields§
§runtime_config: T
The resolved runtime configuration.
key_value_resolver: RuntimeConfigResolver
The resolver used to resolve key-value stores from runtime configuration.
sqlite_resolver: RuntimeConfigResolver
The resolver used to resolve sqlite databases from runtime configuration.
state_dir: Option<PathBuf>
The fully resolved state directory.
None
is used for an “unset” state directory which each factor will treat differently.
log_dir: Option<PathBuf>
The fully resolved log directory.
None
is used for an “unset” log directory.
toml: Table
The input TOML, for informational summaries.
Implementations§
Source§impl<T> ResolvedRuntimeConfig<T>
impl<T> ResolvedRuntimeConfig<T>
Source§impl<T> ResolvedRuntimeConfig<T>where
T: for<'a, 'b> TryFrom<TomlRuntimeConfigSource<'a, 'b>>,
for<'a, 'b> <T as TryFrom<TomlRuntimeConfigSource<'a, 'b>>>::Error: Into<Error>,
impl<T> ResolvedRuntimeConfig<T>where
T: for<'a, 'b> TryFrom<TomlRuntimeConfigSource<'a, 'b>>,
for<'a, 'b> <T as TryFrom<TomlRuntimeConfigSource<'a, 'b>>>::Error: Into<Error>,
Sourcepub fn from_file(
runtime_config_path: Option<&Path>,
local_app_dir: Option<PathBuf>,
provided_state_dir: UserProvidedPath,
provided_log_dir: UserProvidedPath,
) -> Result<Self>
pub fn from_file( runtime_config_path: Option<&Path>, local_app_dir: Option<PathBuf>, provided_state_dir: UserProvidedPath, provided_log_dir: UserProvidedPath, ) -> Result<Self>
Creates a new resolved runtime configuration from a runtime config source TOML file.
provided_state_dir
is the explicitly provided state directory, if any.
Auto Trait Implementations§
impl<T> Freeze for ResolvedRuntimeConfig<T>where
T: Freeze,
impl<T> !RefUnwindSafe for ResolvedRuntimeConfig<T>
impl<T> Send for ResolvedRuntimeConfig<T>where
T: Send,
impl<T> Sync for ResolvedRuntimeConfig<T>where
T: Sync,
impl<T> Unpin for ResolvedRuntimeConfig<T>where
T: Unpin,
impl<T> !UnwindSafe for ResolvedRuntimeConfig<T>
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
Source§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
Query the “status” flags for the
self
file descriptor.Source§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
Source§fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
Set the “status” flags for the
self
file descriptor. Read moreSource§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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request