Struct rustbreak::Lock
[−]
[src]
pub struct Lock<'a, T: Serialize + Deserialize + Eq + Hash + 'a> { /* fields omitted */ }
Structure representing a lock of the Database
Methods
impl<'a, T: Serialize + Deserialize + Eq + Hash + 'a> Lock<'a, T>
[src]
fn insert<S: Serialize + 'static, K: ?Sized>(&mut self,
key: &K,
obj: S)
-> Result<()> where T: Borrow<K>, K: Hash + PartialEq + ToOwned<Owned=T>
key: &K,
obj: S)
-> Result<()> where T: Borrow<K>, K: Hash + PartialEq + ToOwned<Owned=T>
Insert a given Object into the Database at that key
See Database::insert
for details
fn retrieve<S: Deserialize, K: ?Sized>(&mut self, key: &K) -> Result<S> where T: Borrow<K>, K: Hash + Eq
Retrieves an Object from the Database
See Database::retrieve
for details
fn transaction<'b>(&'b mut self) -> TransactionLock<'a, 'b, T>
Starts a transaction
See Database::transaction
for details