pub struct RenderBackupTemplatesStep<S> { /* private fields */ }Expand description
Step that renders Backup templates to the build directory
This step handles the preparation of backup configuration files by rendering templates to the build directory. The rendered files are then ready to be deployed to the remote host.
Implementations§
Source§impl<S> RenderBackupTemplatesStep<S>
impl<S> RenderBackupTemplatesStep<S>
Sourcepub fn new(
environment: Arc<Environment<S>>,
templates_dir: PathBuf,
build_dir: PathBuf,
) -> Self
pub fn new( environment: Arc<Environment<S>>, templates_dir: PathBuf, build_dir: PathBuf, ) -> Self
Creates a new RenderBackupTemplatesStep
§Arguments
environment- The deployment environmenttemplates_dir- The templates directorybuild_dir- The build directory where templates will be rendered
Sourcepub async fn execute(
&self,
) -> Result<Option<PathBuf>, BackupTemplateRenderingServiceError>
pub async fn execute( &self, ) -> Result<Option<PathBuf>, BackupTemplateRenderingServiceError>
Execute the template rendering step
This will render backup templates to the build directory if backup configuration is present in the environment.
§Returns
Returns the path to the backup build directory on success, or None
if backup is not configured.
§Errors
Returns an error if:
- Template rendering fails
- Directory creation fails
- File writing fails
Auto Trait Implementations§
impl<S> Freeze for RenderBackupTemplatesStep<S>
impl<S> RefUnwindSafe for RenderBackupTemplatesStep<S>
impl<S> Send for RenderBackupTemplatesStep<S>
impl<S> Sync for RenderBackupTemplatesStep<S>
impl<S> Unpin for RenderBackupTemplatesStep<S>
impl<S> UnsafeUnpin for RenderBackupTemplatesStep<S>
impl<S> UnwindSafe for RenderBackupTemplatesStep<S>
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> 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