mirror of
https://github.com/robertwayne/axum-htmx
synced 2024-12-17 22:39:33 +01:00
Merge pull request #7 from ItsEthra/cfg-badges
Generate docs with cfg badges using nightly compiler
This commit is contained in:
commit
02cb1e64c1
4 changed files with 10 additions and 0 deletions
|
@ -12,6 +12,7 @@ edition = "2021"
|
|||
|
||||
[features]
|
||||
default = []
|
||||
unstable = []
|
||||
guards = ["tower", "futures-core", "pin-project-lite"]
|
||||
serde = ["dep:serde", "dep:serde_json"]
|
||||
|
||||
|
@ -26,3 +27,6 @@ pin-project-lite = { version = "0.2", optional = true }
|
|||
# Optional dependencies required for the `serde` feature.
|
||||
serde = { version = "1", features = ["derive"], optional = true }
|
||||
serde_json = { version = "1", optional = true }
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
all-features = true
|
||||
|
|
|
@ -51,6 +51,7 @@ impl<'a, S> Layer<S> for HxRequestGuardLayer<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
/// Tower service that implementes redirecting to non-partial routes.
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct HxRequestGuard<'a, S> {
|
||||
inner: S,
|
||||
|
|
|
@ -1,13 +1,17 @@
|
|||
#![cfg_attr(feature = "unstable", feature(doc_cfg))]
|
||||
#![doc = include_str!("../README.md")]
|
||||
#![forbid(unsafe_code)]
|
||||
|
||||
pub mod extractors;
|
||||
#[cfg(feature = "guards")]
|
||||
#[cfg_attr(feature = "unstable", doc(cfg(feature = "guards")))]
|
||||
pub mod guard;
|
||||
pub mod headers;
|
||||
pub mod responders;
|
||||
|
||||
pub use extractors::*;
|
||||
#[cfg(feature = "guards")]
|
||||
#[cfg_attr(feature = "unstable", doc(cfg(feature = "guards")))]
|
||||
pub use guard::*;
|
||||
pub use headers::*;
|
||||
pub use responders::*;
|
||||
|
|
|
@ -10,6 +10,7 @@ use axum::{
|
|||
use crate::headers;
|
||||
|
||||
#[cfg(feature = "serde")]
|
||||
#[cfg_attr(feature = "unstable", doc(cfg(feature = "serde")))]
|
||||
pub mod serde;
|
||||
|
||||
const HX_SWAP_INNER_HTML: &str = "innerHTML";
|
||||
|
|
Loading…
Reference in a new issue