pub trait Full2WayBridge: Sized + Syncwhere
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§
sourcetype Base: Full2WayBridgeBase<Left = Self::Left, Right = Self::Right>
type Base: Full2WayBridgeBase<Left = Self::Left, Right = Self::Right>
Base portion of the bidirectional complex relay.
sourcetype Left: ChainWithTransactions + ChainWithBalances + ChainWithMessages + ChainWithRuntimeVersion
type Left: ChainWithTransactions + ChainWithBalances + ChainWithMessages + ChainWithRuntimeVersion
The left relay chain.
sourcetype Right: ChainWithTransactions + ChainWithBalances + ChainWithMessages + ChainWithRuntimeVersion
type Right: ChainWithTransactions + ChainWithBalances + ChainWithMessages + ChainWithRuntimeVersion
The right relay chain.
sourcetype L2R: MessagesCliBridge<Source = Self::Left, Target = Self::Right>
type L2R: MessagesCliBridge<Source = Self::Left, Target = Self::Right>
Left to Right bridge.
sourcetype R2L: MessagesCliBridge<Source = Self::Right, Target = Self::Left>
type R2L: MessagesCliBridge<Source = Self::Right, Target = Self::Left>
Right to Left bridge
Required Methods§
Provided Methods§
sourcefn left_to_right(
&mut self,
) -> FullBridge<'_, Self::Left, Self::Right, Self::L2R>
fn left_to_right( &mut self, ) -> FullBridge<'_, Self::Left, Self::Right, Self::L2R>
Creates and returns Left to Right complex relay.
sourcefn right_to_left(
&mut self,
) -> FullBridge<'_, Self::Right, Self::Left, Self::R2L>
fn right_to_left( &mut self, ) -> FullBridge<'_, Self::Right, Self::Left, Self::R2L>
Creates and returns Right to Left complex relay.
Object Safety§
This trait is not object safe.