1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
//! Session Serializer module - Batch operations for session file I/O
//!
//! This module provides high-level functions for batch serialization and
//! deserialization of multiple download sessions. It handles file I/O
//! operations for loading and saving session data.
//!
//! # Overview
//!
//! The session serializer is responsible for:
//! - **Loading**: Reading session files and deserializing all entries
//! - **Saving**: Serializing RequestGroup objects to session file format
//! - **Batch processing**: Converting between in-memory representations and file format
//!
//! # Architecture
//!
//! This module builds upon [`SessionEntry`] from the `session_entry` module:
//! - Individual entry parsing/serialization is handled by `SessionEntry`
//! - This module handles multi-entry files and RequestGroup conversions
//! - File I/O operations use atomic write patterns (write tmp + rename)
//!
//! # File Format
//!
//! Session files contain one or more entries separated by blank lines:
//!
//! ```text
//! uri1 uri2
//! GID=hex_value
//! option=value
//!
//! uri3
//! GID=another_hex
//! PAUSE=true
//! ```
//!
//! # Examples
//!
//! ```rust,no_run
//! use aria2_core::session::session_serializer::{load_from_file, save_to_file};
//! use std::path::Path;
//!
//! #[tokio::main]
//! async fn main() {
//! let path = Path::new("aria2.session");
//! let _entries = load_from_file(path).await.unwrap();
//! }
//! ```
// Re-export core types from session_entry module
pub use ;
// Re-export all public functions from sub-modules
pub use deserialize;
pub use ;
pub use ;