[][src]Trait sled::transaction::Transactional

pub trait Transactional<E = ()> {
    type View;
    fn make_overlay(&self) -> Result<TransactionalTrees>;
fn view_overlay(overlay: &TransactionalTrees) -> Self::View; fn transaction<F, A>(&self, f: F) -> TransactionResult<A, E>
    where
        F: Fn(&Self::View) -> ConflictableTransactionResult<A, E>
, { ... } }

A type that may be transacted on in sled transactions.

Associated Types

type View

An internal reference to an internal proxy type that mediates transactional reads and writes.

Loading content...

Required methods

fn make_overlay(&self) -> Result<TransactionalTrees>

An internal function for creating a top-level transactional structure.

fn view_overlay(overlay: &TransactionalTrees) -> Self::View

An internal function for viewing the transactional subcomponents based on the top-level transactional structure.

Loading content...

Provided methods

fn transaction<F, A>(&self, f: F) -> TransactionResult<A, E> where
    F: Fn(&Self::View) -> ConflictableTransactionResult<A, E>, 

Runs a transaction, possibly retrying the passed-in closure if a concurrent conflict is detected that would cause a violation of serializability. This is the only trait method that you're most likely to use directly.

Loading content...

Implementations on Foreign Types

impl<E> Transactional<E> for [Tree][src]

impl<E, '_> Transactional<E> for [&'_ Tree][src]

impl<E, '_> Transactional<E> for (&'_ Tree,)[src]

impl<E, '_, '_> Transactional<E> for (&'_ Tree, &'_ Tree)[src]

impl<E, '_, '_, '_> Transactional<E> for (&'_ Tree, &'_ Tree, &'_ Tree)[src]

impl<E, '_, '_, '_, '_> Transactional<E> for (&'_ Tree, &'_ Tree, &'_ Tree, &'_ Tree)[src]

impl<E, '_, '_, '_, '_, '_> Transactional<E> for (&'_ Tree, &'_ Tree, &'_ Tree, &'_ Tree, &'_ Tree)[src]

impl<E, '_, '_, '_, '_, '_, '_> Transactional<E> for (&'_ Tree, &'_ Tree, &'_ Tree, &'_ Tree, &'_ Tree, &'_ Tree)[src]

impl<E, '_, '_, '_, '_, '_, '_, '_> Transactional<E> for (&'_ Tree, &'_ Tree, &'_ Tree, &'_ Tree, &'_ Tree, &'_ Tree, &'_ Tree)[src]

impl<E, '_, '_, '_, '_, '_, '_, '_, '_> Transactional<E> for (&'_ Tree, &'_ Tree, &'_ Tree, &'_ Tree, &'_ Tree, &'_ Tree, &'_ Tree, &'_ Tree)[src]

impl<E, '_, '_, '_, '_, '_, '_, '_, '_, '_> Transactional<E> for (&'_ Tree, &'_ Tree, &'_ Tree, &'_ Tree, &'_ Tree, &'_ Tree, &'_ Tree, &'_ Tree, &'_ Tree)[src]

impl<E, '_, '_, '_, '_, '_, '_, '_, '_, '_, '_> Transactional<E> for (&'_ Tree, &'_ Tree, &'_ Tree, &'_ Tree, &'_ Tree, &'_ Tree, &'_ Tree, &'_ Tree, &'_ Tree, &'_ Tree)[src]

impl<E, '_, '_, '_, '_, '_, '_, '_, '_, '_, '_, '_> Transactional<E> for (&'_ Tree, &'_ Tree, &'_ Tree, &'_ Tree, &'_ Tree, &'_ Tree, &'_ Tree, &'_ Tree, &'_ Tree, &'_ Tree, &'_ Tree)[src]

impl<E, '_, '_, '_, '_, '_, '_, '_, '_, '_, '_, '_, '_> Transactional<E> for (&'_ Tree, &'_ Tree, &'_ Tree, &'_ Tree, &'_ Tree, &'_ Tree, &'_ Tree, &'_ Tree, &'_ Tree, &'_ Tree, &'_ Tree, &'_ Tree)[src]

impl<E, '_, '_, '_, '_, '_, '_, '_, '_, '_, '_, '_, '_, '_> Transactional<E> for (&'_ Tree, &'_ Tree, &'_ Tree, &'_ Tree, &'_ Tree, &'_ Tree, &'_ Tree, &'_ Tree, &'_ Tree, &'_ Tree, &'_ Tree, &'_ Tree, &'_ Tree)[src]

impl<E, '_, '_, '_, '_, '_, '_, '_, '_, '_, '_, '_, '_, '_, '_> Transactional<E> for (&'_ Tree, &'_ Tree, &'_ Tree, &'_ Tree, &'_ Tree, &'_ Tree, &'_ Tree, &'_ Tree, &'_ Tree, &'_ Tree, &'_ Tree, &'_ Tree, &'_ Tree, &'_ Tree)[src]

Loading content...

Implementors

impl<E> Transactional<E> for Tree[src]

impl<E, '_> Transactional<E> for &'_ Tree[src]

impl<E, '_, '_> Transactional<E> for &'_ &'_ Tree[src]

Loading content...