Skip to content

Commit 58daacc

Browse files
committed
doc: Add doc comment
1 parent c55b388 commit 58daacc

File tree

5 files changed

+27
-4
lines changed

5 files changed

+27
-4
lines changed

src/error.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
//! Module to export tide_core errors
2+
3+
use core::pin::Pin;
4+
use futures::future::Future;
5+
6+
pub use tide_core::error::{
7+
EndpointResult, Error, ResponseExt, ResultDynErrExt, ResultExt, StringError,
8+
};
9+
10+
pub(crate) type BoxTryFuture<T> = Pin<Box<dyn Future<Output = EndpointResult<T>> + Send + 'static>>;

src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
nonstandard_style,
66
rust_2018_idioms,
77
future_incompatible,
8-
missing_debug_implementations
8+
missing_debug_implementations,
9+
missing_docs
910
)]
1011

1112
//!

src/middleware.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
//! Middlewares
2+
3+
// Core
4+
pub use tide_core::middleware::{Middleware, Next};
5+
6+
// Exports from tide repo.
7+
pub use tide_headers::DefaultHeaders;
8+
pub use tide_log::RequestLogger;
9+
10+
#[cfg(feature = "cookies")]
11+
pub use tide_cookies::CookiesMiddleware;

tide-core/src/route.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ impl<'a, State: 'static> Route<'a, State> {
3939

4040
/// Add endpoint nested routes as in the example
4141
///```rust, no_run
42-
/// router.at("/b").nest(|router| {
43-
/// router.at("/").get(async move |_| "/b");
44-
/// router.at("/a").get(async move |_| "/b/a");
42+
/// router.at("/a").nest(|router| {
43+
/// router.at("/").get(async move |_| "/a");
44+
/// router.at("/b").get(async move |_| "/a/b");
4545
///```
4646
pub fn nest(&mut self, f: impl FnOnce(&mut Route<'a, State>)) -> &mut Self {
4747
f(self);

tide-querystring/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ use tide_core::{error::Error, Context};
1515

1616
/// An extension trait for `Context`, providing query string deserialization.
1717
pub trait ContextExt<'de> {
18+
/// Analyze url and extract query parameters
1819
fn url_query<T: Deserialize<'de>>(&'de self) -> Result<T, Error>;
1920
}
2021

0 commit comments

Comments
 (0)