Expand description
Core domain and engine for shaul.
The main chain is:
Link -> LinkParser -> Resource -> Router -> DownloadBackend, driven by
DownloadEngine over Task / FileItem / segments.
Re-exports§
pub use archive::ArchiveExtractor;pub use archive::BuiltinExtractor;pub use archive::ExtractReport;pub use archive::ExtractorRegistry;pub use archive::ExtractorRequest;pub use backend::BackendCapabilities;pub use backend::DownloadBackend;pub use backend::DownloadOutcome;pub use backend::DownloadRequest;pub use backend::FileOutcome;pub use backend::ResumeCheckpoint;pub use blocking::BlockingEngine;pub use cache::CachePruneReport;pub use cache::CacheStats;pub use cache::ContentCache;pub use checksum::Checksum;pub use checksum::ChecksumAlgorithm;pub use checksum::compute_file_checksum;pub use config::BtConfig;pub use config::Config;pub use config::DownloadConfig;pub use config::HubConfig;pub use config::NetworkConfig;pub use config::ResolvedOptions;pub use disk::ensure_free_space;pub use engine::DownloadEngine;pub use error::Error;pub use error::Result;pub use event::DownloadEvent;pub use event::EventKind;pub use event::EventSink;pub use finalizer::ExtractFinalizer;pub use finalizer::ExtractorFinalizer;pub use finalizer::FinalizeContext;pub use finalizer::FinalizeResult;pub use finalizer::Finalizer;pub use finalizer::FinalizerPipeline;pub use finalizer::VerifyFinalizer;pub use header::Auth;pub use header::Header;pub use header::RequestOptions;pub use header::expand_env;pub use link::Link;pub use parser::LinkParser;pub use parser::ParseOptions;pub use parser::ParserRegistry;pub use path::safe_join;pub use path::sanitize_file_name;pub use path::sanitize_relative_path;pub use range::ByteRange;pub use range::completed_bytes;pub use range::merge_ranges;pub use range::missing_ranges;pub use range::split_range;pub use resource::BitTorrentSource;pub use resource::HubProvider;pub use resource::HubRepoType;pub use resource::Resource;pub use resource::ResourceFile;pub use resource::ResourceKind;pub use router::RoutedResource;pub use router::Router;pub use router::backend_arc;pub use router::parser_arc;pub use store::SidecarStore;pub use store::TaskStore;pub use store::TaskUpdate;pub use task::FileItem;pub use task::FileResume;pub use task::FileState;pub use task::Task;pub use task::TaskId;pub use task::TaskOptions;pub use task::TaskResume;pub use task::TaskState;pub use task::Validator;pub use task::VerifyMode;pub use task::destination_file;pub use task::part_path;pub use telemetry::NoopTelemetry;pub use telemetry::Telemetry;pub use telemetry::metrics;
Modules§
- archive
- Archive detection and safe extraction.
- backend
- Download backend trait plus the request/outcome types exchanged with it.
- blocking
- Blocking facade over the asynchronous engine.
- cache
- Content-addressed cache for verified downloads. Content-addressed cache for verified downloads.
- checksum
- Checksum algorithms, checksum parsing and file digest computation.
- config
- Configuration files, sections and resolved download options.
- disk
- Destination filesystem checks. Destination filesystem checks.
- engine
- Asynchronous engine that drives tasks through parsers, backends and finalizers.
- error
- Central error type and result alias.
- event
- Progress event types and event sinks.
- finalizer
- Post-download verification and extraction pipeline.
- header
- Validated HTTP headers, authentication and request options.
- link
- Raw user input and its validation.
- parser
- Link parser trait, registry and parse options.
- path
- File-name sanitization and safe path joining.
- range
- Byte-range arithmetic used for segmentation and resume.
- resource
- Backend-agnostic descriptions of the resource to download.
- router
- Routing of links to parsers and resources to backends.
- store
- Task persistence traits and the JSON sidecar store.
- task
- Task, file and resume state bookkeeping.
- telemetry
- Numeric metrics hooks for external monitoring systems. Low-cardinality metrics hooks for external monitoring systems.
Structs§
- Cancellation
Token - A token which can be used to signal a cancellation request to one or more tasks.