-
Notifications
You must be signed in to change notification settings - Fork 50
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
Adjust permissions to support uniffi module outside the repo #175
Adjust permissions to support uniffi module outside the repo #175
Conversation
Signed-off-by: conanoc <conanoc@gmail.com>
src/lib.rs
Outdated
|
||
pub mod kms; | ||
|
||
mod store; | ||
pub mod store; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's in the store module that's not being exposed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the symbols I use from store.
pub use aries_askar::store::{entry, PassKey, Session, Store, StoreKeyMethod};
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't you just use aries_askar::{entry, PassKey, Session, Store, StoreKeyMethod}
though?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. It works.
Signed-off-by: conanoc <conanoc@gmail.com>
src/kms/entry.rs
Outdated
@@ -65,6 +65,11 @@ impl KeyEntry { | |||
self.name.as_str() | |||
} | |||
|
|||
/// Accessor for the key tags | |||
pub fn tags_as_ref(&self) -> &Vec<EntryTag> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could return a slice to avoid exposing implementation details: self.tags.as_slice()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Signed-off-by: conanoc <conanoc@gmail.com>
Signed-off-by: conanoc <conanoc@gmail.com>
After all, What I need is just adding an accessor for |
…let-foundation#175) * Adjust permissions to support uniffi module outside the repo Signed-off-by: conanoc <conanoc@gmail.com> * respond to comments Signed-off-by: conanoc <conanoc@gmail.com> * hide store, return tags as slice Signed-off-by: conanoc <conanoc@gmail.com> * revert unnecessary changes Signed-off-by: conanoc <conanoc@gmail.com> --------- Signed-off-by: conanoc <conanoc@gmail.com> Co-authored-by: Andrew Whitehead <cywolf@gmail.com>
Please take a look @andrewwhitehead
I could make a uniffi module as a separate crate with these changes. I added some dummy documents in error.rs and store.rs to make them public.