Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add wrappers for
SecItemDelete
and SecItemUpdate
Thank you for the great library! This PR adds `delete_item`, `update_item` and `ItemUpdateOptions`. The functions reuse `SearchItemParams` to identify which items to modify and so I've also added a `to_dictionary` method to `SearchItemParams`. In fact, it would probably make sense to replace `SearchItemParams::search` with a `search_item` function in line with the add/update/delete API, but I didn't want to make unnecessary changes. Also in the spirit of minimising changes to existing code: - I added a slightly strange API to `ItemUpdateOptions::set_class` to allow for rewriting the secret data without overwriting the class. Alternatively, I could add an `ItemUpdateValue` that is the same as `ItemAddValue`, but doesn't take a class. - `ItemUpdateOptions` is basically a duplicate of `ItemAddOptions`. I could instead define `struct ItemAddOptions(ItemUpdateOptions)` and then just forward all the methods. Signed-off-by: Klim Tsoutsman <klim@tsoutsman.com>
- Loading branch information