pub enum IOOutput {
Print {
text: String,
style: OutputStyle,
},
Prompt {
message: String,
},
ShowApprovalRequest {
id: String,
operation: String,
description: String,
},
ShowApproved {
approval_id: String,
},
ShowRejected {
approval_id: String,
reason: Option<String>,
},
ShowProcessing {
component: String,
operation: String,
},
Clear,
}Expand description
Output from Bridge layer to View layer.
Represents display instructions for the View layer. The View layer is responsible for rendering these appropriately for its output medium (console, WebSocket, GUI, etc.).
Variants§
Print text with style.
Generic text output with styling hints.
Prompt
Prompt for user input.
Displays a prompt message and indicates the system is waiting for user input.
ShowApprovalRequest
Display an approval request.
Shows a HIL approval request awaiting user decision.
Fields
ShowApproved
Confirm approval was granted.
ShowRejected
Confirm rejection.
ShowProcessing
Notify that a component has started processing.
Displayed to the user so they know the system is working (especially important for LLM calls that take time).
Fields
Clear
Clear the display.
Implementations§
Source§impl IOOutput
impl IOOutput
Sourcepub fn approval_request(request: &ApprovalRequest) -> Self
pub fn approval_request(request: &ApprovalRequest) -> Self
Creates a ShowApprovalRequest output from an ApprovalRequest.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for IOOutput
impl<'de> Deserialize<'de> for IOOutput
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for IOOutput
impl RefUnwindSafe for IOOutput
impl Send for IOOutput
impl Sync for IOOutput
impl Unpin for IOOutput
impl UnsafeUnpin for IOOutput
impl UnwindSafe for IOOutput
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