pub struct ValidateCommandController { /* private fields */ }Expand description
Presentation layer controller for validate command workflow
Coordinates user interaction, progress reporting, and input validation for validating environment configuration files without deployment.
§Responsibilities
- Validate file path exists and is readable
- Show progress updates to the user
- Format validation results for display
- Delegate validation logic to application layer
§Architecture
This controller sits in the presentation layer and handles all user-facing
concerns. Business logic is delegated to the application layer’s
ValidateCommandHandler.
Implementations§
Source§impl ValidateCommandController
impl ValidateCommandController
Sourcepub fn new(user_output: Arc<ReentrantMutex<RefCell<UserOutput>>>) -> Self
pub fn new(user_output: Arc<ReentrantMutex<RefCell<UserOutput>>>) -> Self
Create a new validate command controller
Creates a ValidateCommandController with user output.
This follows the single container architecture pattern.
Sourcepub fn execute(
&mut self,
env_file: &Path,
output_format: OutputFormat,
) -> Result<(), ValidateSubcommandError>
pub fn execute( &mut self, env_file: &Path, output_format: OutputFormat, ) -> Result<(), ValidateSubcommandError>
Execute the validate command workflow
Main entry point for the validate command. Orchestrates the validation workflow: loads configuration, validates schema and fields.
§Arguments
env_file- Path to the environment configuration file
§Returns
Returns Ok(()) on successful validation, or a ValidateSubcommandError
if validation fails.
§Errors
Returns an error if:
- File path does not exist
- File is not readable
- Configuration validation fails
Auto Trait Implementations§
impl !RefUnwindSafe for ValidateCommandController
impl !UnwindSafe for ValidateCommandController
impl Freeze for ValidateCommandController
impl Send for ValidateCommandController
impl Sync for ValidateCommandController
impl Unpin for ValidateCommandController
impl UnsafeUnpin for ValidateCommandController
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