Skip to main content

odl/
lib.rs

1//! ODL — Open-source Download Library and CLI
2//!
3//! This crate provides a flexible, resumable, and configurable download manager
4//! with a small CLI and library API. Intended for use as both a library and a
5//! standalone binary. Public types and modules expose the high-level API used
6//! by applications:
7//!
8//! - `Download` — primary download instruction type (create via `from_response_info` or
9//!   `from_metadata`).
10//! - `download_manager` — higher-level operations to evaluate and run downloads.
11//! - `config` — persistent configuration for the manager.
12//!
13//! Example (library usage):
14//!
15//! ```no_run
16//! use odl::{Download, download_manager::DownloadManager, config::Config};
17//! // create a `DownloadManager` with default `Config` and call `evaluate`/`download`.
18//! ```
19
20pub mod config;
21pub mod conflict;
22pub mod credentials;
23mod download;
24pub mod download_manager;
25pub mod error;
26mod fs_utils;
27mod hash;
28pub mod progress;
29mod response_info;
30mod retry_policies;
31pub mod user_agents;
32
33pub mod proto {
34    pub mod download_metadata {
35        include!(concat!(env!("OUT_DIR"), "/odl.download_metadata.rs"));
36    }
37    mod download_metadata_ext;
38}
39
40pub use download::Download;
41pub use proto::download_metadata;