oo7 0.6.0

James Bond went on a new mission and this time as a Secret Service provider
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::{
    Key,
    file::{self, UnlockedItem, api},
};

/// A locked variant of [`UnlockedItem`]
#[derive(Clone, Debug)]
pub struct LockedItem {
    pub(crate) inner: api::EncryptedItem,
}

impl LockedItem {
    /// Unlocks the item.
    pub fn unlock(self, key: &Key) -> Result<UnlockedItem, file::Error> {
        self.inner.decrypt(key)
    }
}