灵符lingfu

ling-net

↓ 0 downloads

Async networking — HTTP, WebSocket, QUIC, and peer-to-peer

Keywords net, async, http, quic, websocket, p2p
lingfu install ling-net
LicenseApache-2.0 OR MIT
AuthorsLing Lin, Sanny Lin
READMECode / FilesVersionsDependency GraphDependentsSecurityBuildsSettings

Code / Files (26)

src/lingtp/error.rs
#[derive(Debug, thiserror::Error)]
pub enum LingtpError {
    #[error("io error: {0}")]
    Io(#[from] std::io::Error),
    #[error("lingtp protocol error: {0}")]
    Protocol(String),
    #[error("lingtp crypto error: {0}")]
    Crypto(&'static str),
    #[error(
        "host key for {0} does not match the one on file in .lingtp/known_hosts — \
         refusing to continue (possible MITM); remove the stale entry only if you're sure"
    )]
    HostKeyMismatch(String),
    #[error("lingtp envelope (de)serialization error: {0}")]
    Json(#[from] serde_json::Error),
}

← Back to index