#[cfg(any(unix, windows))]
mod helpers;
pub mod input;
pub mod keys;
mod plain;
pub mod reconcile;
mod record;
mod session;
pub mod term;
pub mod ui;
pub mod wire;
#[cfg(any(unix, windows))]
pub use helpers::{Answer, AskOptions, PrintOptions, Submission, ask, ask_with, print};
pub use keys::Key;
pub use plain::plain;
pub use session::{Capabilities, Input, Options, Session, Surface, SurfaceOptions};
pub use term::Waker;
pub use ui::{Node, View};
pub use wire::{Event, Font, Mode, Op};
#[derive(Debug, thiserror::Error)]
pub enum Error {
#[error("i/o: {0}")]
Io(#[from] std::io::Error),
#[error("json: {0}")]
Json(#[from] serde_json::Error),
#[error("{path}: duplicate child key {key:?}")]
DuplicateId {
path: String,
key: String,
},
#[error("{0}")]
InvalidView(String),
#[error("a blob of {0} bytes is over the 16 MiB limit")]
BlobTooLarge(usize),
#[error("surface {0:?} is closed")]
SurfaceClosed(String),
#[error("timed out waiting for {0}")]
Timeout(&'static str),
#[error("the terminal closed its input")]
InputClosed,
}