pub struct TrackerTemplateRenderingService { /* private fields */ }Expand description
Service for rendering Tracker configuration templates
This service encapsulates the logic for rendering tracker.toml configuration files. It’s designed to be shared across command handlers and steps that need to prepare Tracker configuration.
Implementations§
Source§impl TrackerTemplateRenderingService
impl TrackerTemplateRenderingService
Sourcepub fn from_paths(
templates_dir: PathBuf,
build_dir: PathBuf,
clock: Arc<dyn Clock>,
) -> Self
pub fn from_paths( templates_dir: PathBuf, build_dir: PathBuf, clock: Arc<dyn Clock>, ) -> Self
Build a TrackerTemplateRenderingService from environment paths
§Arguments
templates_dir- Directory containing the source templatesbuild_dir- Directory where rendered templates will be writtenclock- The clock for generating timestamps
§Returns
Returns a configured TrackerTemplateRenderingService ready for template rendering
Sourcepub fn render(
&self,
tracker_config: &TrackerConfig,
) -> Result<PathBuf, TrackerTemplateRenderingServiceError>
pub fn render( &self, tracker_config: &TrackerConfig, ) -> Result<PathBuf, TrackerTemplateRenderingServiceError>
Render Tracker configuration templates
This renders the tracker.toml configuration file to the build directory.
§Arguments
tracker_config- Tracker configuration from user inputs
§Returns
Returns the path to the rendered tracker build directory
§Errors
Returns TrackerTemplateRenderingServiceError::RenderingFailed if template rendering fails.
Auto Trait Implementations§
impl !RefUnwindSafe for TrackerTemplateRenderingService
impl !UnwindSafe for TrackerTemplateRenderingService
impl Freeze for TrackerTemplateRenderingService
impl Send for TrackerTemplateRenderingService
impl Sync for TrackerTemplateRenderingService
impl Unpin for TrackerTemplateRenderingService
impl UnsafeUnpin for TrackerTemplateRenderingService
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