mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-21 00:00:14 +02:00
make docs feature labels show up automatically
This commit is contained in:
@@ -40,7 +40,7 @@
|
||||
#![deny(unreachable_pub, private_in_public)]
|
||||
#![allow(elided_lifetimes_in_paths, clippy::type_complexity)]
|
||||
#![forbid(unsafe_code)]
|
||||
#![cfg_attr(docsrs, feature(doc_cfg))]
|
||||
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
|
||||
#![cfg_attr(test, allow(clippy::float_cmp))]
|
||||
|
||||
pub mod extract;
|
||||
|
||||
@@ -10,11 +10,9 @@ mod typed;
|
||||
pub use self::resource::Resource;
|
||||
|
||||
#[cfg(feature = "typed-routing")]
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "typed-routing")))]
|
||||
pub use axum_macros::TypedPath;
|
||||
|
||||
#[cfg(feature = "typed-routing")]
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "typed-routing")))]
|
||||
pub use self::typed::{FirstElementIs, TypedPath};
|
||||
|
||||
/// Extension trait that adds additional methods to [`Router`].
|
||||
@@ -51,7 +49,6 @@ pub trait RouterExt<B>: sealed::Sealed {
|
||||
///
|
||||
/// See [`TypedPath`] for more details and examples.
|
||||
#[cfg(feature = "typed-routing")]
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "typed-routing")))]
|
||||
fn typed_get<H, T, P>(self, handler: H) -> Self
|
||||
where
|
||||
H: Handler<T, B>,
|
||||
@@ -65,7 +62,6 @@ pub trait RouterExt<B>: sealed::Sealed {
|
||||
///
|
||||
/// See [`TypedPath`] for more details and examples.
|
||||
#[cfg(feature = "typed-routing")]
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "typed-routing")))]
|
||||
fn typed_delete<H, T, P>(self, handler: H) -> Self
|
||||
where
|
||||
H: Handler<T, B>,
|
||||
@@ -79,7 +75,6 @@ pub trait RouterExt<B>: sealed::Sealed {
|
||||
///
|
||||
/// See [`TypedPath`] for more details and examples.
|
||||
#[cfg(feature = "typed-routing")]
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "typed-routing")))]
|
||||
fn typed_head<H, T, P>(self, handler: H) -> Self
|
||||
where
|
||||
H: Handler<T, B>,
|
||||
@@ -93,7 +88,6 @@ pub trait RouterExt<B>: sealed::Sealed {
|
||||
///
|
||||
/// See [`TypedPath`] for more details and examples.
|
||||
#[cfg(feature = "typed-routing")]
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "typed-routing")))]
|
||||
fn typed_options<H, T, P>(self, handler: H) -> Self
|
||||
where
|
||||
H: Handler<T, B>,
|
||||
@@ -107,7 +101,6 @@ pub trait RouterExt<B>: sealed::Sealed {
|
||||
///
|
||||
/// See [`TypedPath`] for more details and examples.
|
||||
#[cfg(feature = "typed-routing")]
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "typed-routing")))]
|
||||
fn typed_patch<H, T, P>(self, handler: H) -> Self
|
||||
where
|
||||
H: Handler<T, B>,
|
||||
@@ -121,7 +114,6 @@ pub trait RouterExt<B>: sealed::Sealed {
|
||||
///
|
||||
/// See [`TypedPath`] for more details and examples.
|
||||
#[cfg(feature = "typed-routing")]
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "typed-routing")))]
|
||||
fn typed_post<H, T, P>(self, handler: H) -> Self
|
||||
where
|
||||
H: Handler<T, B>,
|
||||
@@ -135,7 +127,6 @@ pub trait RouterExt<B>: sealed::Sealed {
|
||||
///
|
||||
/// See [`TypedPath`] for more details and examples.
|
||||
#[cfg(feature = "typed-routing")]
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "typed-routing")))]
|
||||
fn typed_put<H, T, P>(self, handler: H) -> Self
|
||||
where
|
||||
H: Handler<T, B>,
|
||||
@@ -149,7 +140,6 @@ pub trait RouterExt<B>: sealed::Sealed {
|
||||
///
|
||||
/// See [`TypedPath`] for more details and examples.
|
||||
#[cfg(feature = "typed-routing")]
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "typed-routing")))]
|
||||
fn typed_trace<H, T, P>(self, handler: H) -> Self
|
||||
where
|
||||
H: Handler<T, B>,
|
||||
@@ -169,7 +159,6 @@ where
|
||||
}
|
||||
|
||||
#[cfg(feature = "typed-routing")]
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "typed-routing")))]
|
||||
fn typed_get<H, T, P>(self, handler: H) -> Self
|
||||
where
|
||||
H: Handler<T, B>,
|
||||
@@ -180,7 +169,6 @@ where
|
||||
}
|
||||
|
||||
#[cfg(feature = "typed-routing")]
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "typed-routing")))]
|
||||
fn typed_delete<H, T, P>(self, handler: H) -> Self
|
||||
where
|
||||
H: Handler<T, B>,
|
||||
@@ -191,7 +179,6 @@ where
|
||||
}
|
||||
|
||||
#[cfg(feature = "typed-routing")]
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "typed-routing")))]
|
||||
fn typed_head<H, T, P>(self, handler: H) -> Self
|
||||
where
|
||||
H: Handler<T, B>,
|
||||
@@ -202,7 +189,6 @@ where
|
||||
}
|
||||
|
||||
#[cfg(feature = "typed-routing")]
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "typed-routing")))]
|
||||
fn typed_options<H, T, P>(self, handler: H) -> Self
|
||||
where
|
||||
H: Handler<T, B>,
|
||||
@@ -213,7 +199,6 @@ where
|
||||
}
|
||||
|
||||
#[cfg(feature = "typed-routing")]
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "typed-routing")))]
|
||||
fn typed_patch<H, T, P>(self, handler: H) -> Self
|
||||
where
|
||||
H: Handler<T, B>,
|
||||
@@ -224,7 +209,6 @@ where
|
||||
}
|
||||
|
||||
#[cfg(feature = "typed-routing")]
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "typed-routing")))]
|
||||
fn typed_post<H, T, P>(self, handler: H) -> Self
|
||||
where
|
||||
H: Handler<T, B>,
|
||||
@@ -235,7 +219,6 @@ where
|
||||
}
|
||||
|
||||
#[cfg(feature = "typed-routing")]
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "typed-routing")))]
|
||||
fn typed_put<H, T, P>(self, handler: H) -> Self
|
||||
where
|
||||
H: Handler<T, B>,
|
||||
@@ -246,7 +229,6 @@ where
|
||||
}
|
||||
|
||||
#[cfg(feature = "typed-routing")]
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "typed-routing")))]
|
||||
fn typed_trace<H, T, P>(self, handler: H) -> Self
|
||||
where
|
||||
H: Handler<T, B>,
|
||||
|
||||
Reference in New Issue
Block a user