Add documentation of the main crate and first objects.
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
65898987a6
commit
aca5a57460
15
src/main.rs
15
src/main.rs
|
@ -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>,
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue