referrerpolicy=no-referrer-when-downgrade
substrate_relay_helper::cli::relay_headers_and_messages

Trait Full2WayBridge

Source
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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§