Trait ContextTr

pub trait ContextTr {
    type Block: Block;
    type Tx: Transaction;
    type Cfg: Cfg;
    type Db: Database;
    type Journal: JournalTr<Database = Self::Db>;
    type Chain;

    // Required methods
    fn tx(&self) -> &Self::Tx;
    fn block(&self) -> &Self::Block;
    fn cfg(&self) -> &Self::Cfg;
    fn journal(&mut self) -> &mut Self::Journal;
    fn journal_ref(&self) -> &Self::Journal;
    fn db(&mut self) -> &mut Self::Db;
    fn db_ref(&self) -> &Self::Db;
    fn chain(&mut self) -> &mut Self::Chain;
    fn error(
        &mut self,
    ) -> &mut Result<(), ContextError<<Self::Db as Database>::Error>>;
    fn tx_journal(&mut self) -> (&mut Self::Tx, &mut Self::Journal);
}

Required Associated Types§

type Block: Block

type Tx: Transaction

type Cfg: Cfg

type Db: Database

type Journal: JournalTr<Database = Self::Db>

type Chain

Required Methods§

fn tx(&self) -> &Self::Tx

fn block(&self) -> &Self::Block

fn cfg(&self) -> &Self::Cfg

fn journal(&mut self) -> &mut Self::Journal

fn journal_ref(&self) -> &Self::Journal

fn db(&mut self) -> &mut Self::Db

fn db_ref(&self) -> &Self::Db

fn chain(&mut self) -> &mut Self::Chain

fn error( &mut self, ) -> &mut Result<(), ContextError<<Self::Db as Database>::Error>>

fn tx_journal(&mut self) -> (&mut Self::Tx, &mut Self::Journal)

Implementations on Foreign Types§

§

impl<'a, T> ContextTr for &'a mut T
where T: 'a + ContextTr + ?Sized,

§

type Block = <T as ContextTr>::Block

§

type Tx = <T as ContextTr>::Tx

§

type Cfg = <T as ContextTr>::Cfg

§

type Db = <T as ContextTr>::Db

§

type Journal = <T as ContextTr>::Journal

§

type Chain = <T as ContextTr>::Chain

§

fn tx(&self) -> &<&'a mut T as ContextTr>::Tx

§

fn block(&self) -> &<&'a mut T as ContextTr>::Block

§

fn cfg(&self) -> &<&'a mut T as ContextTr>::Cfg

§

fn journal(&mut self) -> &mut <&'a mut T as ContextTr>::Journal

§

fn journal_ref(&self) -> &<&'a mut T as ContextTr>::Journal

§

fn db(&mut self) -> &mut <&'a mut T as ContextTr>::Db

§

fn db_ref(&self) -> &<&'a mut T as ContextTr>::Db

§

fn chain(&mut self) -> &mut <&'a mut T as ContextTr>::Chain

§

fn error( &mut self, ) -> &mut Result<(), ContextError<<<&'a mut T as ContextTr>::Db as Database>::Error>>

§

fn tx_journal( &mut self, ) -> (&mut <&'a mut T as ContextTr>::Tx, &mut <&'a mut T as ContextTr>::Journal)

§

impl<T> ContextTr for Box<T>
where T: ContextTr + ?Sized,

§

type Block = <T as ContextTr>::Block

§

type Tx = <T as ContextTr>::Tx

§

type Cfg = <T as ContextTr>::Cfg

§

type Db = <T as ContextTr>::Db

§

type Journal = <T as ContextTr>::Journal

§

type Chain = <T as ContextTr>::Chain

§

fn tx(&self) -> &<Box<T> as ContextTr>::Tx

§

fn block(&self) -> &<Box<T> as ContextTr>::Block

§

fn cfg(&self) -> &<Box<T> as ContextTr>::Cfg

§

fn journal(&mut self) -> &mut <Box<T> as ContextTr>::Journal

§

fn journal_ref(&self) -> &<Box<T> as ContextTr>::Journal

§

fn db(&mut self) -> &mut <Box<T> as ContextTr>::Db

§

fn db_ref(&self) -> &<Box<T> as ContextTr>::Db

§

fn chain(&mut self) -> &mut <Box<T> as ContextTr>::Chain

§

fn error( &mut self, ) -> &mut Result<(), ContextError<<<Box<T> as ContextTr>::Db as Database>::Error>>

§

fn tx_journal( &mut self, ) -> (&mut <Box<T> as ContextTr>::Tx, &mut <Box<T> as ContextTr>::Journal)

Implementors§

§

impl<BLOCK, TX, DB, CFG, JOURNAL, CHAIN> ContextTr for Context<BLOCK, TX, CFG, DB, JOURNAL, CHAIN>
where BLOCK: Block, TX: Transaction, DB: Database, CFG: Cfg, JOURNAL: JournalTr<Database = DB>,

§

type Block = BLOCK

§

type Tx = TX

§

type Cfg = CFG

§

type Db = DB

§

type Journal = JOURNAL

§

type Chain = CHAIN