Update docs

This commit is contained in:
Sunli
2021-12-12 11:37:04 +08:00
parent 0af69b8c50
commit 95bd96e64f
8 changed files with 16 additions and 37 deletions

View File

@@ -33,7 +33,7 @@
//! ```
#![doc(html_favicon_url = "https://poem.rs/assets/favicon.ico")]
#![doc(html_logo_url = "https://poem.rs/assets/logo.png")]
#![doc(html_logo_url = "https://poem.rs/en/assets/logo.png")]
#![forbid(unsafe_code)]
#![deny(private_in_public, unreachable_pub)]
#![cfg_attr(docsrs, feature(doc_cfg))]

View File

@@ -1,7 +1,7 @@
//! Macros for poem
#![doc(html_favicon_url = "https://poem.rs/assets/favicon.ico")]
#![doc(html_logo_url = "https://poem.rs/assets/logo.png")]
#![doc(html_logo_url = "https://poem.rs/en/assets/logo.png")]
#![forbid(unsafe_code)]
#![deny(private_in_public, unreachable_pub)]
#![cfg_attr(docsrs, feature(doc_cfg))]

View File

@@ -1,7 +1,7 @@
//! Poem for AWS Lambda.
#![doc(html_favicon_url = "https://poem.rs/assets/favicon.ico")]
#![doc(html_logo_url = "https://poem.rs/assets/logo.png")]
#![doc(html_logo_url = "https://poem.rs/en/assets/logo.png")]
#![forbid(unsafe_code)]
#![deny(private_in_public, unreachable_pub)]
#![cfg_attr(docsrs, feature(doc_cfg))]

View File

@@ -1,7 +1,7 @@
//! Macros for poem-openapi
#![doc(html_favicon_url = "https://poem.rs/assets/favicon.ico")]
#![doc(html_logo_url = "https://poem.rs/assets/logo.png")]
#![doc(html_logo_url = "https://poem.rs/en/assets/logo.png")]
#![forbid(unsafe_code)]
#![deny(private_in_public, unreachable_pub)]

View File

@@ -56,7 +56,7 @@ To avoid compiling unused dependencies, Poem gates certain features, some of whi
| redoc | Add Redoc UI support |
| email | Support for email address string |
| hostname | Support for hostname string |
| uuid | Integrate with the [`uuid` crate](https://crates.io/crates/uuid) | |
| uuid | Integrate with the [`uuid` crate](https://crates.io/crates/uuid) |
## Safety

View File

@@ -25,11 +25,15 @@
//! To avoid compiling unused dependencies, Poem gates certain features, some of
//! which are disabled by default:
//!
//! | Feature | Description | Default enabled |
//! | ---------- | -------------------------------- | --------------- |
//! | chrono | Integrate with the [`chrono` crate](https://crates.io/crates/chrono). | :x: |
//! | swagger-ui | Add swagger UI support | :heavy_check_mark: |
//! | rapidoc | Add RapiDoc support | :heavy_check_mark: |
//! | Feature | Description |
//! |------------|-----------------------------------------------------------------------|
//! | chrono | Integrate with the [`chrono` crate](https://crates.io/crates/chrono). |
//! | swagger-ui | Add swagger UI support |
//! | rapidoc | Add RapiDoc UI support |
//! | redoc | Add Redoc UI support |
//! | email | Support for email address string |
//! | hostname | Support for hostname string |
//! | uuid | Integrate with the [`uuid` crate](https://crates.io/crates/uuid)|
//!
//! ## Example
//!
@@ -78,7 +82,7 @@
//! ```
#![doc(html_favicon_url = "https://poem.rs/assets/favicon.ico")]
#![doc(html_logo_url = "https://poem.rs/assets/logo.png")]
#![doc(html_logo_url = "https://poem.rs/en/assets/logo.png")]
#![forbid(unsafe_code)]
#![deny(private_in_public, unreachable_pub)]
#![cfg_attr(docsrs, feature(doc_cfg))]

View File

@@ -11,31 +11,6 @@ use crate::{
Body, Endpoint, Request, Response,
};
// #[derive(Template)]
// #[template(
// ext = "html",
// source = r#"
// <html>
// <head>
// <title>Index of {{ path }}</title>
// </head>
// <body>
// <h1>Index of /{{ path }}</h1>
// <ul>
// {% for file in files %}
// <li>
// {% if file.is_dir %}
// <a href="{{ file.url }}">{{ file.filename | e }}/</a>
// {% else %}
// <a href="{{ file.url }}">{{ file.filename | e }}</a>
// {% endif %}
// </li>
// {% endfor %}
// </ul>
// </body>
// </html>
// "#
// )]
struct DirectoryTemplate<'a> {
path: &'a str,
files: Vec<FileRef>,

View File

@@ -51,7 +51,7 @@
//! |websocket | Support for WebSocket |
#![doc(html_favicon_url = "https://poem.rs/assets/favicon.ico")]
#![doc(html_logo_url = "https://poem.rs/assets/logo.png")]
#![doc(html_logo_url = "https://poem.rs/en/assets/logo.png")]
#![forbid(unsafe_code)]
#![deny(private_in_public, unreachable_pub)]
#![cfg_attr(docsrs, feature(doc_cfg))]