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: 'a + ContextTr + ?Sized> ContextTr for &'a mut T

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) -> &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)

Source§

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

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) -> &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)

Implementors§