pub enum InputPolicy {
Free,
Locked,
Leader {
id: u64,
},
}Expand description
Input acceptance policy for a single pane. Per-pane (not
per-client) so the daemon enforces with one lookup on every
send_keys.
Variants§
Free
Default. Every connected client’s send_keys is written to
the PTY in arrival order. Multi-renderer attach is allowed
to interleave input.
Locked
Rejects every send_keys with WireError::Rejected. The
pane is observe-only — every PaneBytes subscriber still
gets output, but no one can type. Lifted via
Request::SetInputPolicy(pane, InputPolicy::Free).
Leader
#2 — only the client whose connection identified itself with
Request::IdentifyClient(id) matching this leader id may
send keys; every other client is Rejected. Use case: an AI
agent owns a pane and a human can watch (mado subscriber)
without interleaving keystrokes. The leader id is operator-
chosen — a stable 64-bit token your agent surfaces via
TEAR_CLIENT_ID.
Encoded as a struct variant so serde’s internally-tagged representation can carry the integer payload (tagged representation can’t hold a primitive in a tuple variant).
Implementations§
Trait Implementations§
Source§impl Clone for InputPolicy
impl Clone for InputPolicy
Source§fn clone(&self) -> InputPolicy
fn clone(&self) -> InputPolicy
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more