pub struct MiddlewareRequest<'request> {
pub meta: CommandMeta,
pub command_path: &'request str,
pub system: &'request str,
pub user_args: ValueMap,
pub args: ValueMap,
pub default_fields: &'request str,
pub view_id: Option<&'request str>,
pub auth: AuthRequirement,
pub raw_output: bool,
pub pagination_command: Option<String>,
}Expand description
Inputs for one middleware-managed command execution.
Fields§
§meta: CommandMetaPer-command metadata used by authentication, authorization, dry-run, audit, and activity.
command_path: &'request strColon-separated command path.
system: &'request strBackend/system id used in output metadata and generic error attribution.
user_args: ValueMapArguments explicitly supplied by the user.
args: ValueMapEffective arguments, including defaults.
default_fields: &'request strDefault field projection when --fields is absent.
view_id: Option<&'request str>Id of the human view this command declared, if any.
The command path for an inline with_view,
or the shared id from with_view_id.
None renders generic human output.
auth: AuthRequirementAuthentication requirement enforced by the engine for this command.
raw_output: boolMirrors CommandSpec::raw_output:
when true, a successful string result renders verbatim, bypassing
the format/pipeline machinery entirely.
pagination_command: Option<String>The invoked command replayed as --flag value text — command path
plus every flag the user explicitly passed, using clap’s own
long-flag names — with --limit/--offset deliberately omitted.
Some only for a command that opted into
CommandSpec::with_pagination;
the engine appends --limit/--offset for the next page and surfaces
it as a next_actions entry when the response has more data. None
for every other command, and for any caller driving Middleware
directly (e.g. Middleware::run_no_auth) instead of through
Cli, which is what computes this.
Trait Implementations§
Source§impl<'request> Clone for MiddlewareRequest<'request>
impl<'request> Clone for MiddlewareRequest<'request>
Source§fn clone(&self) -> MiddlewareRequest<'request>
fn clone(&self) -> MiddlewareRequest<'request>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more