pub struct ApprovalUI {
pub request_id: String,
pub summary: ApprovalSummary,
pub state: ApprovalUIState,
pub comments: Option<String>,
}Expand description
Approval UI component for displaying and handling approval requests
Fields§
§request_id: StringRequest ID
summary: ApprovalSummaryPlan summary
state: ApprovalUIStateCurrent UI state
comments: Option<String>User comments (if any)
Implementations§
Source§impl ApprovalUI
impl ApprovalUI
Sourcepub fn new(request_id: String, summary: ApprovalSummary) -> Self
pub fn new(request_id: String, summary: ApprovalSummary) -> Self
Create a new approval UI component
Sourcepub fn risk_color(&self) -> &'static str
pub fn risk_color(&self) -> &'static str
Get the risk level color for TUI rendering
Returns a color code suitable for terminal rendering.
Sourcepub fn risk_emoji(&self) -> &'static str
pub fn risk_emoji(&self) -> &'static str
Get the risk level emoji
Sourcepub fn format_display(&self) -> String
pub fn format_display(&self) -> String
Format the approval UI for display
Returns a formatted string suitable for terminal display.
Sourcepub fn get_prompt(&self) -> String
pub fn get_prompt(&self) -> String
Get the approval prompt text
Sourcepub fn get_instructions(&self) -> String
pub fn get_instructions(&self) -> String
Get the approval instructions
Trait Implementations§
Source§impl Clone for ApprovalUI
impl Clone for ApprovalUI
Source§fn clone(&self) -> ApprovalUI
fn clone(&self) -> ApprovalUI
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ApprovalUI
impl RefUnwindSafe for ApprovalUI
impl Send for ApprovalUI
impl Sync for ApprovalUI
impl Unpin for ApprovalUI
impl UnwindSafe for ApprovalUI
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
Mutably borrows from an owned value. Read more