Skip to content

Commit cd8c93c

Browse files
committed
Add more documentation
1 parent 9d4c919 commit cd8c93c

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,8 @@ and can be implemented without [`Zeroize`], otherwise it only implements
242242
- `crate`: an item-level option which specifies a path to the [`zeroize`]
243243
crate in case of a re-export or rename.
244244
- `no_drop`: an item-level option which will not implement [`Drop`] but instead
245-
only assert that every field implements [`ZeroizeOnDrop`].
245+
only assert that every field implements [`ZeroizeOnDrop`]. Requires the
246+
`zeroize-on-drop` feature.
246247

247248
```rust
248249
#[derive_where(ZeroizeOnDrop(crate = zeroize_))]

src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,7 @@
277277
//! crate in case of a re-export or rename.
278278
//! - `no_drop`: an item-level option which will not implement [`Drop`] but
279279
//! instead only assert that every field implements [`ZeroizeOnDrop`].
280+
//! Requires the `zeroize-on-drop` feature.
280281
//!
281282
//! ```
282283
//! # #[cfg(feature = "zeroize-on-drop")]
@@ -438,6 +439,7 @@ const DERIVE_WHERE_VISITED: &str = "derive_where_visited";
438439
/// trait.
439440
/// - `#[derive_where(ZeroizeOnDrop(crate = path))]`: Specify path to
440441
/// [`ZeroizeOnDrop`] trait.
442+
/// - `#[derive_where(ZeroizeOnDrop(no_drop))]`: no [`Drop`] implementation.
441443
/// - `#[derive_where(skip_inner(EqHashOrd, ..))]`: Skip all fields in the item.
442444
/// Optionally specify trait groups to constrain skipping fields. Only works
443445
/// for structs, for enums use this on the variant-level.

0 commit comments

Comments
 (0)