pub enum TemplateCommand {
List,
Show {
name: String,
},
Import {
path: PathBuf,
},
Export {
name: String,
path: PathBuf,
format: TemplateFileFormat,
},
Delete {
name: String,
},
}Variants§
List
List every template (built-in and user-imported).
Show
Show one template’s full detail as JSON.
Import
Import a template from a file. Accepts either a single template as JSON (see
template export’s default output shape) or a multi-template TOML catalog (the same
[[template]] array-of-tables shape as the embedded/user catalog, see template export --format toml) – the format is auto-detected from the file’s content, not
its extension. A JSON single-template import is rejected outright if a template with
that name already exists; a TOML catalog import instead skips (and reports) any
template whose name already exists, so re-importing an updated community catalog
only adds what’s new.
Export
Export a template to a file, e.g. as a starting point for a site-specific copy or a community catalog contribution.
Fields
format: TemplateFileFormatFile format to write. toml emits a single-entry [[template]] catalog block,
ready to paste into a catalog file or open as a contribution pull request.
Delete
Delete a template. Refuses if any saved loop still references it. A Builtin- or
Catalog-origin template reappears automatically the next time bhtune starts unless
it’s also removed from its source (bhtune-core’s embedded catalog for Builtin,
which only a new bhtune release can change; the user catalog file for Catalog).
Trait Implementations§
Source§impl Debug for TemplateCommand
impl Debug for TemplateCommand
Source§impl FromArgMatches for TemplateCommand
impl FromArgMatches for TemplateCommand
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<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Subcommand for TemplateCommand
impl Subcommand for TemplateCommand
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Command] so it can instantiate self via
[FromArgMatches::update_from_arg_matches_mut] Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self can parse a specific subcommandAuto Trait Implementations§
impl Freeze for TemplateCommand
impl RefUnwindSafe for TemplateCommand
impl Send for TemplateCommand
impl Sync for TemplateCommand
impl Unpin for TemplateCommand
impl UnsafeUnpin for TemplateCommand
impl UnwindSafe for TemplateCommand
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].