Struct rustbreak::Lock
[−]
[src]
pub struct Lock<'a, T: Serialize + DeserializeOwned + Eq + Hash + 'a> { /* fields omitted */ }
Structure representing a lock of the Database
Methods
impl<'a, T: Serialize + DeserializeOwned + Eq + Hash + 'a> Lock<'a, T>
[src]
fn insert<S: Serialize, K: ?Sized>(&mut self, key: &K, obj: S) -> Result<()> where
T: Borrow<K>,
K: Hash + PartialEq + ToOwned<Owned = T>,
[src]
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: DeserializeOwned, K: ?Sized>(&mut self, key: &K) -> Result<S> where
T: Borrow<K>,
K: Hash + Eq,
[src]
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>
[src]
Starts a transaction
See Database::transaction
for details