mirror of
https://github.com/robertwayne/axum-htmx
synced 2024-11-30 15:04:32 +01:00
Generate docs with cfg badges
This commit is contained in:
parent
6af52af17f
commit
63efc3ffd5
4 changed files with 10 additions and 0 deletions
|
@ -12,6 +12,7 @@ edition = "2021"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = []
|
default = []
|
||||||
|
unstable = []
|
||||||
guards = ["tower", "futures-core", "pin-project-lite"]
|
guards = ["tower", "futures-core", "pin-project-lite"]
|
||||||
serde = ["dep:serde", "dep:serde_json"]
|
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.
|
# Optional dependencies required for the `serde` feature.
|
||||||
serde = { version = "1", features = ["derive"], optional = true }
|
serde = { version = "1", features = ["derive"], optional = true }
|
||||||
serde_json = { version = "1", 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)]
|
#[derive(Debug, Clone)]
|
||||||
pub struct HxRequestGuard<'a, S> {
|
pub struct HxRequestGuard<'a, S> {
|
||||||
inner: S,
|
inner: S,
|
||||||
|
|
|
@ -1,13 +1,17 @@
|
||||||
|
#![cfg_attr(feature = "unstable", feature(doc_cfg))]
|
||||||
#![doc = include_str!("../README.md")]
|
#![doc = include_str!("../README.md")]
|
||||||
#![forbid(unsafe_code)]
|
#![forbid(unsafe_code)]
|
||||||
|
|
||||||
pub mod extractors;
|
pub mod extractors;
|
||||||
#[cfg(feature = "guards")]
|
#[cfg(feature = "guards")]
|
||||||
|
#[cfg_attr(feature = "unstable", doc(cfg(feature = "guards")))]
|
||||||
pub mod guard;
|
pub mod guard;
|
||||||
pub mod headers;
|
pub mod headers;
|
||||||
pub mod responders;
|
pub mod responders;
|
||||||
|
|
||||||
pub use extractors::*;
|
pub use extractors::*;
|
||||||
#[cfg(feature = "guards")]
|
#[cfg(feature = "guards")]
|
||||||
|
#[cfg_attr(feature = "unstable", doc(cfg(feature = "guards")))]
|
||||||
pub use guard::*;
|
pub use guard::*;
|
||||||
pub use headers::*;
|
pub use headers::*;
|
||||||
pub use responders::*;
|
pub use responders::*;
|
||||||
|
|
|
@ -10,6 +10,7 @@ use axum::{
|
||||||
use crate::headers;
|
use crate::headers;
|
||||||
|
|
||||||
#[cfg(feature = "serde")]
|
#[cfg(feature = "serde")]
|
||||||
|
#[cfg_attr(feature = "unstable", doc(cfg(feature = "serde")))]
|
||||||
pub mod serde;
|
pub mod serde;
|
||||||
|
|
||||||
const HX_SWAP_INNER_HTML: &str = "innerHTML";
|
const HX_SWAP_INNER_HTML: &str = "innerHTML";
|
||||||
|
|
Loading…
Reference in a new issue