secrets
secrets copied to clipboard
Add functions to access single SecretVec items
Currently SecretVec only allows borrowing an (im)mutable wrapper around the box slice. This means any struct using a SecretVec and holding open references to content inside need to hold both the borrowed SecretVec and the Box borrow produced by its methods. This commit adds get, get_mut, and an iterator for direct access to items without the Box borrow indirection. The types ItemRef and ItemRefMut preserve the locking rules while acting as a handle to individual values in the Box.