Skip to content

[WIP] aead: add doc_usage! macro #1945

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

tarcieri
Copy link
Member

@tarcieri tarcieri commented Aug 3, 2025

Adds a macro which generates the crate usage boilerplate, customized to a specific crate and example AEAD cipher.

Downstream crates can use it like:

#![doc = include_str!("../README.md")]
#![doc = aead::doc_usage!(Aes256Gcm)]

Rendering of the generated rustdoc showing the macro output on top and the original boilerplate text below:

Screenshot 2025-08-02 at 6 28 30 PM

Adds a macro which generates the crate usage boilerplate, customized to
a specific crate and example AEAD cipher.

Downstream crates can use it like:

    #![doc = include_str!("../README.md")]
    #![doc = aead::doc_usage!(Aes256Gcm)]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant