rage icon indicating copy to clipboard operation
rage copied to clipboard

API: `IdentityFileEntry.into_identity` and `.to_recipient` not accessible

Open bspot opened this issue 1 year ago • 2 comments

I appears that IdentityFileEntry.into_identity and .to_recipient are pub(crate), so I can't use them in my own crate.

https://github.com/str4d/rage/blob/f84af2c069514ed61392597349d945680c51b074/age/src/identity.rs#L22

Is there a specific reason for that or could they be made pub?

bspot avatar Apr 18 '23 10:04 bspot

The logic they implement can be implemented outside the age crate, because IdentityFileEntry is a transparent enum. That being said, they are nice helpers to have available. The only issue is that if the plugin feature is not enabled, it would be preferable to not require the callbacks argument, which makes the API a bit awkward to use, but that is still doable.

str4d avatar Aug 07 '23 09:08 str4d

Hmm, this might end up interacting with the refactor I need to do as mentioned in https://github.com/str4d/rage/pull/334#issuecomment-1236127574. So while I can place the callbacks arg behind the plugin feature flag, I'll wait until I'm a bit further into #403 before working on this issue.

str4d avatar Aug 07 '23 10:08 str4d

The refactor mentioned above is #504.

str4d avatar Jul 28 '24 19:07 str4d