car_mirror_axum/lib.rs
1#![cfg_attr(docsrs, feature(doc_cfg))]
2#![warn(missing_debug_implementations, missing_docs, rust_2018_idioms)]
3#![deny(unreachable_pub)]
4
5//! # car-mirror-axum
6//!
7//! This crate exposes a very basic car mirror server.
8//! It accepts `GET /dag/pull/:cid`, `POST /dag/pull/:cid` and `POST /dag/push/:cid` requests
9//! with streaming car file request and response types, respectively.
10//!
11//! It is roughly based on the [car-mirror-http specification](https://github.com/wnfs-wg/car-mirror-http-spec).
12//!
13//! It also exposes some utilities with which it's easier to build a car-mirror axum server.
14//!
15//! At the moment, it's recommended to only make use of the `extract` module, and mostly
16//! use the rest of the library for tests or treat the rest of the code as an example
17//! to copy code from for actual production use.
18
19mod error;
20pub mod extract;
21mod server;
22
23pub use error::*;
24pub use server::*;