pub struct CliParser {
TimeoutSecs: u64,
}Expand description
CLI arguments parser with validation
Fields§
§TimeoutSecs: u64Implementations§
Source§impl CliParser
impl CliParser
Sourcepub fn with_timeout(TimeoutSecs: u64) -> Self
pub fn with_timeout(TimeoutSecs: u64) -> Self
Create a new CLI parser with custom timeout
Sourcepub fn parse(args: Vec<String>) -> Result<Command, String>
pub fn parse(args: Vec<String>) -> Result<Command, String>
Parse command line arguments into Command
Sourcepub fn parse_args(&self, args: Vec<String>) -> Result<Command, String>
pub fn parse_args(&self, args: Vec<String>) -> Result<Command, String>
Parse command line arguments into Command with timeout setting
Sourcefn parse_status(&self, args: &[String]) -> Result<Command, String>
fn parse_status(&self, args: &[String]) -> Result<Command, String>
Parse status command with validation
Sourcefn parse_restart(&self, args: &[String]) -> Result<Command, String>
fn parse_restart(&self, args: &[String]) -> Result<Command, String>
Parse restart command with validation
Sourcefn parse_config(&self, args: &[String]) -> Result<Command, String>
fn parse_config(&self, args: &[String]) -> Result<Command, String>
Parse config subcommand with validation
Sourcefn parse_metrics(&self, args: &[String]) -> Result<Command, String>
fn parse_metrics(&self, args: &[String]) -> Result<Command, String>
Parse metrics command with validation
Sourcefn parse_logs(&self, args: &[String]) -> Result<Command, String>
fn parse_logs(&self, args: &[String]) -> Result<Command, String>
Parse logs command with validation
Sourcefn parse_debug(&self, args: &[String]) -> Result<Command, String>
fn parse_debug(&self, args: &[String]) -> Result<Command, String>
Parse debug subcommand with validation
Sourcefn validate_service_name(service: &Option<String>) -> Result<(), String>
fn validate_service_name(service: &Option<String>) -> Result<(), String>
Validate service name format
Sourcefn validate_config_value(key: &str, value: &str) -> Result<(), String>
fn validate_config_value(key: &str, value: &str) -> Result<(), String>
Validate configuration value
Auto Trait Implementations§
impl Freeze for CliParser
impl RefUnwindSafe for CliParser
impl Send for CliParser
impl Sync for CliParser
impl Unpin for CliParser
impl UnwindSafe for CliParser
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].