Trait ContextTr

Source
pub trait ContextTr {
    type Block: Block;
    type Tx: Transaction;
    type Cfg: Cfg;
    type Db: Database;
    type Journal: Journal<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<(), <Self::Db as Database>::Error>;
    fn tx_journal(&mut self) -> (&mut Self::Tx, &mut Self::Journal);
}

Required Associated Types§

Required Methods§

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Implementations on Foreign Types§

Source§

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

Source§

type Block = <T as ContextTr>::Block

Source§

type Tx = <T as ContextTr>::Tx

Source§

type Cfg = <T as ContextTr>::Cfg

Source§

type Db = <T as ContextTr>::Db

Source§

type Journal = <T as ContextTr>::Journal

Source§

type Chain = <T as ContextTr>::Chain

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

type Block = <T as ContextTr>::Block

Source§

type Tx = <T as ContextTr>::Tx

Source§

type Cfg = <T as ContextTr>::Cfg

Source§

type Db = <T as ContextTr>::Db

Source§

type Journal = <T as ContextTr>::Journal

Source§

type Chain = <T as ContextTr>::Chain

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Implementors§

Source§

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

Source§

type Block = BLOCK

Source§

type Tx = TX

Source§

type Cfg = CFG

Source§

type Db = DB

Source§

type Journal = JOURNAL

Source§

type Chain = CHAIN