pub struct ShowCommandHandler { /* private fields */ }Expand description
ShowCommandHandler extracts and formats environment information for display
Purpose: Read-only information extraction from environment state
This handler loads an environment from storage and extracts information relevant to the environment’s current state. It never modifies state or makes network calls.
§Information Extraction
- All states: Name, state name, provider
- Provisioned+: Infrastructure details (IP, SSH credentials)
- All states: Next step guidance
Implementations§
Source§impl ShowCommandHandler
impl ShowCommandHandler
Sourcepub fn new(repository: Arc<dyn EnvironmentRepository>) -> Self
pub fn new(repository: Arc<dyn EnvironmentRepository>) -> Self
Create a new ShowCommandHandler
Sourcepub fn execute(
&self,
env_name: &EnvironmentName,
) -> Result<EnvironmentInfo, ShowCommandHandlerError>
pub fn execute( &self, env_name: &EnvironmentName, ) -> Result<EnvironmentInfo, ShowCommandHandlerError>
Execute the show command workflow
Loads the environment and extracts state-aware information for display.
§Arguments
env_name- The name of the environment to show
§Returns
Ok(EnvironmentInfo)- Information about the environmentErr(ShowCommandHandlerError)- If the environment cannot be loaded
§Errors
Returns an error if:
- Environment not found
- Environment state file is corrupted or unreadable
Auto Trait Implementations§
impl !RefUnwindSafe for ShowCommandHandler
impl !Send for ShowCommandHandler
impl !Sync for ShowCommandHandler
impl !UnwindSafe for ShowCommandHandler
impl Freeze for ShowCommandHandler
impl Unpin for ShowCommandHandler
impl UnsafeUnpin for ShowCommandHandler
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