Skip to main content

ReviewDiffBuilder

Trait ReviewDiffBuilder 

Source
pub trait ReviewDiffBuilder: Send + Sync {
    // Required method
    fn diff(&self, request: &PolicyRequest<'_>) -> Vec<ReviewDiffEntry>;
}
Expand description

Builds the before/after lines of a InteractionKind::ReviewChanges card.

The engine cannot know what a domain command changes, so the diff is injected. Returning an empty diff is allowed and safe: the engine then falls back to a plain InteractionKind::ConfirmCommand card, which ConfirmationPolicy::ReviewCard also accepts, rather than persisting a review card with nothing to review.

Required Methods§

Source

fn diff(&self, request: &PolicyRequest<'_>) -> Vec<ReviewDiffEntry>

Lines to show for request.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§