mineru_sdk/
lib.rs

1pub mod client;
2pub mod error;
3pub mod types;
4
5pub use client::MineruClient;
6pub use error::MineruError;
7pub use types::*;
8
9#[cfg(test)]
10mod tests {
11    use super::*;
12
13    #[test]
14    fn test_struct_serialization() {
15        let req = ExtractTaskRequest {
16            url: "http://example.com".to_string(),
17            is_ocr: false,
18            enable_formula: true,
19            enable_table: true,
20            language: "ch".to_string(),
21            data_id: None,
22            callback: None,
23            seed: None,
24            extra_formats: None,
25            page_ranges: None,
26            model_version: "pipeline".to_string(),
27        };
28        let json = serde_json::to_string(&req).unwrap();
29        assert!(json.contains("http://example.com"));
30    }
31}