blivemsg 0.2.0

Bilibili Live Message Library
Documentation
#[derive(Debug, thiserror::Error)]
pub enum Error {
    #[error("Cookie 文件不存在: {0}")]
    CookieFileNotFound(std::path::PathBuf),
    
    #[error("HTTP 请求失败: {0}")]
    HttpError(#[from] wreq::Error),
    
    #[error("WebSocket 连接失败: {0}")]
    WsError(#[from] tokio_tungstenite::tungstenite::Error),
    
    #[error("JSON 解析失败: {0}")]
    JsonError(#[from] serde_json::Error),
    
    #[error("房间 ID 无效: {0}")]
    InvalidRoomId(u64),
    
    #[error("IO 错误: {0}")]
    IoError(#[from] std::io::Error),
    
    #[error("认证失败")]
    AuthenticationFailed,
}