Skip to content
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

Document multiple available paths #24

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,9 @@ impl<'a> From<Vec<u8>> for CertificateRevocationListDer<'a> {
/// Certificates are identified in PEM context as `CERTIFICATE` and when stored in a
/// file usually use a `.pem`, `.cer` or `.crt` extension. For more on PEM files, refer to the
/// crate documentation.
///
/// This type is available as either `rustls_pki_types::CertificateDer` or re-exported as
/// `rustls::pki_types::CertificateDer`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I'm onboard with this crate documenting things going on in others. Even though minor, it seems like a bit of a layering violation?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not a layering violation because pki-types isn't a distinct layer from rustls. It's a workaround for a specific problem of semver versioning, but it is notionally a part of rustls. It is maintained by the same team and it's part of rustls' public API. It's okay for the documentation pages of rustls and pki_types (and other rustls ecosystem crates) to be aware of each other. More than okay: it's important for the documentation pages of rustls ecosystem crates to be aware of each other, so we can help users understand how the pieces fit together.

#[derive(Clone, Debug, PartialEq, Eq)]
pub struct CertificateDer<'a>(Der<'a>);

Expand Down