Skip to main content

Module types

Module types 

Source
Expand description

Bidirectional streaming types

This module defines the core types for bidirectional communication in Plexus RPC. These types enable server-to-client requests during streaming execution, supporting interactive workflows like confirmations, prompts, and selection menus.

§Type System

The bidirectional system uses a generic type design that separates:

  1. Standard types (StandardRequest/StandardResponse) for common UI patterns
  2. Custom types that activations can define for domain-specific interactions

§Wire Format

All types use serde for serialization. The standard types use internally-tagged enums for JSON-friendly wire format:

// StandardRequest::Confirm
{ "type": "confirm", "message": "Delete file?", "default": false }

// StandardResponse::Confirmed
{ "type": "confirmed", "value": true }

§Error Handling

BidirError covers all failure modes:

Structs§

SelectOption
An option in a StandardRequest::Select request.

Enums§

BidirError
Error types for bidirectional communication
StandardRequest
Standard request types for common interactive UI patterns.
StandardResponse
Standard response types matching StandardRequest.