Skip to content

Commit

Permalink
Document #[zeroize(skip)] in the zeroize crate (#662)
Browse files Browse the repository at this point in the history
  • Loading branch information
daxpedda committed Nov 10, 2021
1 parent c678c96 commit 3b81567
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
11 changes: 6 additions & 5 deletions zeroize/derive/src/lib.rs
Expand Up @@ -14,12 +14,13 @@ decl_derive!(

/// Derive the `Zeroize` trait.
///
/// Supports the following attribute:
/// Supports the following attributes:
///
/// - `#[zeroize(drop)]`: derives the `Drop` trait, calling `zeroize()`
/// when this item is dropped.
/// - `#[zeroize(skip)]`: skips this field or variant when calling
/// `zeroize()`.
/// On the item level:
/// - `#[zeroize(drop)]`: call `zeroize()` when this item is dropped
///
/// On the field level:
/// - `#[zeroize(skip)]`: skips this field or variant when calling `zeroize()`
derive_zeroize
);

Expand Down
6 changes: 5 additions & 1 deletion zeroize/src/lib.rs
Expand Up @@ -66,10 +66,14 @@
//! which automatically calls `zeroize()` on all members of a struct
//! or tuple struct.
//!
//! Additionally it supports the following attribute:
//! Additionally it supports the following attributes:
//!
//! On the item level:
//! - `#[zeroize(drop)]`: call `zeroize()` when this item is dropped
//!
//! On the field level:
//! - `#[zeroize(skip)]`: skips this field or variant when calling `zeroize()`
//!
//! Example which derives `Drop`:
//!
//! ```
Expand Down

0 comments on commit 3b81567

Please sign in to comment.