#[non_exhaustive]pub struct ApprovalStage {
pub requirement_id: ApprovalRequirementRef,
pub position: usize,
pub total_stages: usize,
pub argv: Vec<String>,
pub argv_complete: bool,
pub resolution: ApprovalStageResolution,
pub suggested_prefix: Option<ApprovalSuggestedPrefix>,
}Expand description
One stage of a shell approval: a single command from the pipeline or
command list, approved separately from the others.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.requirement_id: ApprovalRequirementRefThis stage’s requirement id. When it equals the approval’s
currentRequirementId, send it as requirementId in approval/decide.
position: usizeThis stage’s 1-based position in the command; it equals
requirementId.sourceIndex + 1.
total_stages: usizeThe total number of stages in the command.
argv: Vec<String>The stage’s command words as parsed. When argvComplete is false,
this can be a single unparsed piece of the command.
argv_complete: booltrue when argv is the stage’s complete command, known before it
runs; false when part of it cannot be resolved ahead of time (for
example a command substitution). A stage with false never has a
suggestedPrefix.
resolution: ApprovalStageResolutionWhether this stage still needs a decision or, if not, how it was satisfied.
suggested_prefix: Option<ApprovalSuggestedPrefix>A command prefix the host suggests always allowing in this workspace,
present only when one can be taken from a fully parsed stage.
availableChoices shows whether that grant is offered.