Files
xserial/crates/xserial-client/src/error.rs
FallenSigh 530986d068 feat: xserial-client with session management, mlua integration, and 238 tests
- Session: background I/O task with SessionHandle for send/read/close/reconfigure
- SessionManager: multi-session collection with aggregated event broadcast
- Config: serializable SessionConfig/PipelineConfig/FramerConfig/DecoderConfig
- Lua: xserial global (open/list_ports/sleep/log) + session userdata API
- RingBuffer: bounded history buffer with pipeline filtering
- Core: added Serialize/Deserialize+Default to Endian/TextEncoding/PlotFormat
- Core: added Send bound to Framer trait for tokio task compatibility
- 238 tests (193 core + 10 config + 7 Lua + 9 session + 18 pipeline + 1 doctest)
2026-06-08 00:25:59 +08:00

18 lines
407 B
Rust

use thiserror::Error;
#[derive(Error, Debug)]
pub enum Error {
#[error("Connection failed: {0}")]
ConnectionFailed(String),
#[error("Session error: {0}")]
Session(String),
#[error("Lua error: {0}")]
Lua(#[from] mlua::Error),
#[error("I/O error: {0}")]
Io(#[from] std::io::Error),
#[error("{0}")]
Other(String),
}
pub type Result<T> = std::result::Result<T, Error>;