pub struct Cli {
pub config: Option<PathBuf>,
pub db: Option<PathBuf>,
pub templates: Option<PathBuf>,
pub retention_days: Option<u32>,
pub log_level: Option<String>,
pub log_dir: Option<PathBuf>,
pub log_format: Option<String>,
pub log_rotation: Option<String>,
pub command: Command,
}Expand description
The bhtune CLI: a scriptable, no-GUI way to run an MRFT tune and inspect its history.
Fields§
§config: Option<PathBuf>Path to a TOML config file (default: platform-specific, see crate::config).
db: Option<PathBuf>Path to the SQLite database file (default: a platform-standard data directory, see
crate::config::default_db_path_from). CLI > BHTUNE_DB env var > db in the
config file > platform default – see crate::config::resolve_db_path.
templates: Option<PathBuf>Path to a user-supplied DCS/PLC template catalog, auto-loaded on every startup in
addition to the built-in templates (default: platform-specific, next to the config
file – see crate::config::templates_path_from). A missing file at the default
location is fine; a file that fails to parse or validate is a hard error. CLI >
BHTUNE_TEMPLATES env var > templates in the config file > platform default –
see crate::config::load_user_templates.
retention_days: Option<u32>Delete tune runs (and their samples/results/write-back audit rows) older than this
many days, automatically, on every startup (default: unset – retain forever). CLI >
BHTUNE_RETENTION_DAYS env var > retention_days in the config file > (no default)
– see crate::config::resolve_retention_days. bhtune history prune applies the
same policy on demand, with a --dry-run preview, instead of waiting for the next
startup.
log_level: Option<String>Log level / directive spec, e.g. “info” or “bhtune_cli=debug,sqlx=warn” (default:
info). Diagnostic detail only – never printed to stdout, so it can never interleave
with --output json’s single-object contract; see crate::logging.
log_dir: Option<PathBuf>Directory to write log files to (default: a platform-standard data directory, see
crate::config::default_log_dir_from).
log_format: Option<String>Log file format: “pretty” or “json” (default: pretty).
log_rotation: Option<String>Log file rotation: “hourly”, “daily”, or “never” (default: daily).
command: CommandTrait Implementations§
Source§impl Args for Cli
impl Args for Cli
Source§fn group_id() -> Option<Id>
fn group_id() -> Option<Id>
ArgGroup::id][crate::ArgGroup::id] for this set of argumentsSource§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command] so it can instantiate self via
[FromArgMatches::update_from_arg_matches_mut] Read moreSource§impl FromArgMatches for Cli
impl FromArgMatches for Cli
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Parser for Cli
impl Parser for Cli
§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
§fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error>
fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error>
Auto Trait Implementations§
impl Freeze for Cli
impl RefUnwindSafe for Cli
impl Send for Cli
impl Sync for Cli
impl Unpin for Cli
impl UnsafeUnpin for Cli
impl UnwindSafe for Cli
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
§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>
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 more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
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>,
Layered].