[−][src]Struct castor::Txn
A Txn is used to read and write from a Store
Methods
impl<'a, T: Hash> Txn<'a, T>
[src]
pub fn put<V: Value<'a>>(
&mut self,
bucket: &Bucket<'a, Token<T>, V>,
val: V
) -> Result<Token<T>, Error>
[src]
&mut self,
bucket: &Bucket<'a, Token<T>, V>,
val: V
) -> Result<Token<T>, Error>
Add a value to the store and return a token
pub fn fetch<V: Value<'a>>(
&'a self,
bucket: &Bucket<'a, Token<T>, V>,
token: Token<T>
) -> Result<V, Error>
[src]
&'a self,
bucket: &Bucket<'a, Token<T>, V>,
token: Token<T>
) -> Result<V, Error>
Fetch the value associated with the given token
pub fn del<V: Value<'a>>(
&mut self,
bucket: &Bucket<'a, Token<T>, V>,
token: Token<T>
) -> Result<(), Error>
[src]
&mut self,
bucket: &Bucket<'a, Token<T>, V>,
token: Token<T>
) -> Result<(), Error>
Delete the value associated with the given token from the store
Trait Implementations
impl<'a, T: Hash> AsMut<Txn<'a>> for Txn<'a, T>
[src]
impl<'a, T: Hash> AsRef<Txn<'a>> for Txn<'a, T>
[src]
impl<'a, T: Hash> From<Txn<'a, T>> for Txn<'a>
[src]
impl<'a, T: Hash> From<Txn<'a>> for Txn<'a, T>
[src]
Auto Trait Implementations
impl<'a, T> !Send for Txn<'a, T>
impl<'a, T> Unpin for Txn<'a, T> where
T: Unpin,
T: Unpin,
impl<'a, T> !Sync for Txn<'a, T>
impl<'a, T> UnwindSafe for Txn<'a, T> where
T: UnwindSafe,
T: UnwindSafe,
impl<'a, T> RefUnwindSafe for Txn<'a, T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same<T> for T
type Output = T
Should always be Self