Struct castor::Txn
[−]
[src]
pub struct Txn<'a>(pub Txn<'a>);
A Txn is used to read and write from a Store
Methods
impl<'a> Txn<'a>
[src]
pub fn put<V: Value<'a>>(
&mut self,
bucket: &Bucket<'a, Token, V>,
val: V
) -> Result<Token, Error>
[src]
&mut self,
bucket: &Bucket<'a, Token, V>,
val: V
) -> Result<Token, Error>
Add a value to the store and return a token
pub fn fetch<V: Value<'a>>(
&'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<V: Value<'a>>(
&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