referrerpolicy=no-referrer-when-downgrade
pub trait Full2WayBridge: Sized + Sync
where AccountIdOf<Self::Left>: From<<AccountKeyPairOf<Self::Left> as Pair>::Public>, AccountIdOf<Self::Right>: From<<AccountKeyPairOf<Self::Right> as Pair>::Public>, BalanceOf<Self::Left>: TryFrom<BalanceOf<Self::Right>> + Into<u128>, BalanceOf<Self::Right>: TryFrom<BalanceOf<Self::Left>> + Into<u128>,
{ type Base: Full2WayBridgeBase<Left = Self::Left, Right = Self::Right>; type Left: ChainWithTransactions + ChainWithBalances + ChainWithMessages + ChainWithRuntimeVersion; type Right: ChainWithTransactions + ChainWithBalances + ChainWithMessages + ChainWithRuntimeVersion; type L2R: MessagesCliBridge<Source = Self::Left, Target = Self::Right>; type R2L: MessagesCliBridge<Source = Self::Right, Target = Self::Left>; // Required methods fn new(params: <Self::Base as Full2WayBridgeBase>::Params) -> Result<Self>; fn base(&self) -> &Self::Base; fn mut_base(&mut self) -> &mut Self::Base; // Provided methods fn left_to_right( &mut self, ) -> FullBridge<'_, Self::Left, Self::Right, Self::L2R> { ... } fn right_to_left( &mut self, ) -> FullBridge<'_, Self::Right, Self::Left, Self::R2L> { ... } fn run<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: Send + 'async_trait, 'life0: 'async_trait { ... } }
Expand description

Bidirectional complex relay.

Required Associated Types§

source

type Base: Full2WayBridgeBase<Left = Self::Left, Right = Self::Right>

Base portion of the bidirectional complex relay.

source

type Left: ChainWithTransactions + ChainWithBalances + ChainWithMessages + ChainWithRuntimeVersion

The left relay chain.

source

type Right: ChainWithTransactions + ChainWithBalances + ChainWithMessages + ChainWithRuntimeVersion

The right relay chain.

source

type L2R: MessagesCliBridge<Source = Self::Left, Target = Self::Right>

Left to Right bridge.

source

type R2L: MessagesCliBridge<Source = Self::Right, Target = Self::Left>

Right to Left bridge

Required Methods§

source

fn new(params: <Self::Base as Full2WayBridgeBase>::Params) -> Result<Self>

Construct new bridge.

source

fn base(&self) -> &Self::Base

Reference to the base relay portion.

source

fn mut_base(&mut self) -> &mut Self::Base

Mutable reference to the base relay portion.

Provided Methods§

source

fn left_to_right( &mut self, ) -> FullBridge<'_, Self::Left, Self::Right, Self::L2R>

Creates and returns Left to Right complex relay.

source

fn right_to_left( &mut self, ) -> FullBridge<'_, Self::Right, Self::Left, Self::R2L>

Creates and returns Right to Left complex relay.

source

fn run<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: Send + 'async_trait, 'life0: 'async_trait,

Start complex relay.

Object Safety§

This trait is not object safe.

Implementors§