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

Refactor storage into a separate crate #90

Merged

Conversation

andrewwhitehead
Copy link
Contributor

@andrewwhitehead andrewwhitehead commented Jan 31, 2023

Also improves the public API of 'Store' and tidies up the crate exports.

Includes updates to scan records without a category filter (preparation for profile export/migration support).

In draft due to breaking changes, awaiting another minor release.

Follow up from #89

@andrewwhitehead andrewwhitehead marked this pull request as ready for review March 30, 2023 22:08
Copy link
Contributor

@berendsliedrecht berendsliedrecht left a comment

Choose a reason for hiding this comment

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

This is looking great! I see some minor things changed in the python wrapper, are there any breaking changes from an FFI perspective, i.e. the JavaScript wrapper must also be updated? If so, I am happy to pick that up.

askar-storage/Cargo.toml Show resolved Hide resolved
@@ -126,7 +136,9 @@ fn percent_encode_into(result: &mut String, s: &str) {
push_iter_str(result, utf8_percent_encode(s, NON_ALPHANUMERIC))
}

/// A trait implemented by types that can be converted into Options
pub trait IntoOptions<'a> {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason why TryInto for Options is not used? If this for some lower Rust version compatibility?

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 actually because that creates issues accepting a straight Options instance - it implements From<Self> which means TryFrom<Self> is implemented with the Infallable error type, not the crate's error type.

askar-storage/tests/backends.rs Outdated Show resolved Hide resolved
src/ffi/error.rs Outdated Show resolved Hide resolved
@andrewwhitehead
Copy link
Contributor Author

This is looking great! I see some minor things changed in the python wrapper, are there any breaking changes from an FFI perspective, i.e. the JavaScript wrapper must also be updated? If so, I am happy to pick that up.

Most of the changes there are added docstrings, but the category filter is now optional (can be null) for scan_start, count, fetch_all and remove_all.

Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
…emove_all

Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
@andrewwhitehead andrewwhitehead merged commit 89119df into openwallet-foundation:main Jun 23, 2023
@andrewwhitehead andrewwhitehead deleted the upd/refactor-storage branch June 23, 2023 21:39
jamshale pushed a commit to jamshale/askar that referenced this pull request Aug 18, 2024
…refactor-storage

Refactor storage into a separate crate
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