#![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)]
mod client;
mod clock;
mod explain;
pub mod key;
mod lines;
mod methods;
mod protocol;
mod server;
pub const UI_SCENE: &str = "ui.scene";
pub use client::{Client, MAX_REPLY};
pub use clock::{APP_CLOCK, ClockOp, MAX_STEP_MS};
pub use explain::{explain, explain_reply};
pub use lines::{DEFAULT_MAX_LINE, serve_stream};
pub use methods::{AppInfo, DEBUG_METHODS, MAX_BATCH, NoUi, STANDARD_METHODS, UI_METHODS, UiHandler, answer, handle, matches_query};
pub use protocol::{PROTOCOL_VERSION, Reply, Request};
pub use server::{Config, Server, Wake};
use serde_json::Value;
#[derive(Debug, Clone, PartialEq, thiserror::Error)]
pub enum ControlError {
#[error("{0}")]
Io(String),
#[error("control key: {0}")]
Key(String),
#[error("unauthorized: the app refused the control key")]
Unauthorized,
#[error("bad reply from the app: {0}")]
Protocol(String),
#[error("{error}")]
Remote { error: String, detail: Option<Value> },
}