aibot 1.0.2

WeChat iLink Bot API — full async Rust implementation
Documentation
//! # WeChat iLink Bot — Rust SDK
//!
//! 基于[微信官方 iLink Bot HTTP/JSON 协议](https://open.ilink.weixin.qq.com) 的完整异步客户端。
//!
//! 支持扫码登录、长轮询收消息、发送文本/图片/文件/语音、AES-128-ECB 媒体加解密。
//!
//! ## 快速开始
//!
//! ```rust,no_run
//! use aibot::{BotResult, ILinkClient};
//!
//! #[tokio::main]
//! async fn main() -> BotResult<()> {
//!     // 已有 Token 直接连接
//!     let client = ILinkClient::new("your_bot_token", None);
//!
//!     // 长轮询接收消息
//!     let updates = client.get_updates("").await?;
//!     for msg in updates.msgs {
//!         println!("收到消息 from: {}", msg.from_user_id);
//!     }
//!
//!     Ok(())
//! }
//! ```
//!
//! ## 完整示例(含扫码登录)
//!
//! 见 [`main.rs`](https://cnb.cool/kamft/crate/-/blob/main/crates/aibot/src/main.rs) ——
//! 一个可运行的 Bot 封装,支持 Token 持久化、自动扫码、消息循环。

// ── 公开模块 ────────────────────────────────────────

/// HTTP API 客户端 —— 封装所有 iLink 端点调用。
pub mod client;

/// AES-128-ECB 加解密工具 —— 用于媒体文件加解密。
pub mod crypto;

/// 错误类型体系 —— 结构化 `BotError` 枚举,替代 `anyhow`。
pub mod error;

/// 协议类型定义 —— 所有请求/响应结构体、枚举。
pub mod types;

// ── 公开 re-export ──────────────────────────────────

pub use client::ILinkClient;
pub use error::{BotError, BotResult};
pub use types::*;

// ── xbw / serde re-exports ──────────────────────────
// serde_json 统一走 xbw 的实例,避免 aibot 与 xbw 各持一份 serde_json 导致
// serde_core 在发布校验时被当作不同实例;serde 由本 crate 直接依赖(供 derive),
// 与 xbw 的 serde 在解析时合并为同一份
pub use ::serde::{self, Deserialize, Serialize, de::DeserializeOwned};
pub use xbw::all::serde_json::{
    self, Error as JsonError, Map as JsonMap, Result as JsonResult, Value as JsonValue,
    from_reader, from_slice, from_str, from_value, json, to_string, to_string_pretty, to_value,
    to_vec, to_vec_pretty, to_writer, to_writer_pretty,
};