Add documentation of the main crate and first objects.
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Dorian 2024-02-23 23:05:50 -05:00
parent 65898987a6
commit aca5a57460
1 changed files with 11 additions and 4 deletions

View File

@ -1,8 +1,4 @@
#![warn(missing_docs)]
#![doc = include_str!("../README.md")]
/// ## Usage
///
use axum::{
extract::{Host, Json, OriginalUri},
@ -16,6 +12,11 @@ use std::collections::BTreeMap;
use tower_http::trace;
use tracing::{info, warn, Level};
/// CLI arguments used by the [Parser].
///
/// Creates the usage and version information that is standard in a CLI
/// utility.
#[derive(Parser)]
#[command(author, version, about, long_about = None)]
struct CliArgs {
@ -28,12 +29,18 @@ struct CliArgs {
ips: String,
}
/// The response consisting of the echoed request to the mirror-server.
#[derive(Serialize, Deserialize, Debug, PartialEq)]
struct EchoResponse {
/// The [Method] used in the request.
method: String,
/// The path used in the request.
path: String,
/// The original schema, hostname and port of the request.
host: String,
/// The headers in the request.
headers: BTreeMap<String, String>,
/// (Optional) The JSON body in the request.
#[serde(skip_serializing_if = "Option::is_none")]
body: Option<Value>,
}