Struct castor::Txn
[−]
[src]
pub struct Txn<'a, V: Value<'a>>(pub Txn<'a, Token, V>);
A Txn is used to read and write from a Store
Methods
impl<'a, V: Value<'a>> Txn<'a, V>
[src]
pub fn put<V0: Into<V>>(
&mut self,
bucket: &Bucket<'a, Token, V>,
val: V0
) -> Result<Token, Error>
[src]
&mut self,
bucket: &Bucket<'a, Token, V>,
val: V0
) -> Result<Token, Error>
Add a value to the store and return a token
pub fn fetch(
&'a self,
bucket: &Bucket<'a, Token, V>,
token: Token
) -> Result<V, Error>
[src]
&'a self,
bucket: &Bucket<'a, Token, V>,
token: Token
) -> Result<V, Error>
Fetch the value associated with the given token
pub fn del(
&mut self,
bucket: &Bucket<'a, Token, V>,
token: Token
) -> Result<(), Error>
[src]
&mut self,
bucket: &Bucket<'a, Token, V>,
token: Token
) -> Result<(), Error>
Delete the value associated with the given token from the store