pub struct Config {
pub templates_dir: PathBuf,
pub project_root: PathBuf,
pub build_dir: PathBuf,
}Expand description
Configuration parameters for deployment environments.
Centralizes all deployment-related configuration including file paths, service connection details, and runtime behavior settings.
Created once at deployment start and passed to Services::new().
Fields§
§templates_dir: PathBufDirectory containing template files for rendering configurations.
This directory should contain subdirectories for different template types (e.g., “ansible/”, “tofu/”) with template files that will be processed and rendered to the build directory.
project_root: PathBufRoot directory of the project.
Used for resolving relative paths and locating project resources such as SSH key fixtures and project-specific configuration files.
build_dir: PathBufDirectory where rendered configuration files will be written.
All processed templates and generated configuration files are written to subdirectories within this build directory. This directory is typically git-ignored to avoid committing generated files.
Implementations§
Source§impl Config
impl Config
Sourcepub fn new(
templates_dir: PathBuf,
project_root: PathBuf,
build_dir: PathBuf,
) -> Self
pub fn new( templates_dir: PathBuf, project_root: PathBuf, build_dir: PathBuf, ) -> Self
Creates a new configuration with the provided parameters.
let config = Config::new(
PathBuf::from("/home/user/project/templates"),
PathBuf::from("/home/user/project"),
PathBuf::from("/home/user/project/build"),
);Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin 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
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> ⓘ
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> ⓘ
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>
T in a tonic::Request