Skip to content

Conversation

@tarcieri
Copy link
Member

@tarcieri tarcieri commented May 5, 2022

Now that we have a DecodeOwned trait and initial support for on-the-fly PEM decoding, it makes sense to add owned forms of all of the various reference types.

This brings up a question of naming: we can either add *Owned to all of the owned types or add a *Ref to all of the existing reference types.

This PR chooses to do the latter, renaming all of the reference types to make room for the owned types.

Owned types are easier to work with and probably preferable for anyone who can depend on alloc existing, so this PR gives them the shorter name.

The following types are renamed:

  • Any => AnyRef
  • BitString => BitStringRef
  • Ia5String => Ia5StringRef
  • OctetString => OctetStringRef
  • PrintableString => PrintableStringRef
  • Utf8String => Utf8StringRef

Also renames the newly introduced BitStringOwned type to BitString.

@tarcieri tarcieri force-pushed the der/add-ref-to-reference-type-names branch from b8f6612 to ac2721a Compare May 5, 2022 13:25
Now that we have a `DecodeOwned` trait and initial support for
on-the-fly PEM decoding, it makes sense to add owned forms of all of the
various reference types.

This brings up a question of naming: we can either add `*Owned` to all
of the owned types or add a `*Ref` to all of the existing reference
types.

This PR chooses to do the latter, renaming all of the reference types to
make room for the owned types.

Owned types are easier to work with and probably preferable for anyone
who can depend on `alloc` existing, so this PR gives them the shorter
name.

The following types are renamed:

- `Any` => `AnyRef`
- `BitString` => `BitStringRef`
- `Ia5String` => `Ia5StringRef`
- `OctetString` => `OctetStringRef`
- `PrintableString` => `PrintableStringRef`
- `Utf8String` => `Utf8StringRef`

Also renames the newly introduced `BitStringOwned` type to `BitString`.
@tarcieri tarcieri force-pushed the der/add-ref-to-reference-type-names branch from ac2721a to f7e903a Compare May 5, 2022 13:31
@tarcieri tarcieri merged commit b91e908 into master May 5, 2022
@tarcieri tarcieri deleted the der/add-ref-to-reference-type-names branch May 5, 2022 14:02
@tarcieri tarcieri mentioned this pull request May 8, 2022
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.

2 participants