pub trait Full2WayBridgeBase:
Sized
+ Send
+ Sync {
type Params;
type Left: ChainWithTransactions + ChainWithRuntimeVersion;
type Right: ChainWithTransactions + ChainWithRuntimeVersion;
// Required methods
fn common(&self) -> &Full2WayBridgeCommonParams<Self::Left, Self::Right>;
fn mut_common(
&mut self,
) -> &mut Full2WayBridgeCommonParams<Self::Left, Self::Right>;
fn start_on_demand_headers_relayers<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(Arc<dyn OnDemandRelay<Self::Left, Self::Right>>, Arc<dyn OnDemandRelay<Self::Right, Self::Left>>)>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
Base portion of the bidirectional complex relay.
This main purpose of extracting this trait is that in different relays the implementation
of start_on_demand_headers_relayers
method will be different. But the number of
implementations is limited to relay <> relay, parachain <> relay and parachain <> parachain.
This trait allows us to reuse these implementations in different bridges.
Required Associated Types§
Sourcetype Left: ChainWithTransactions + ChainWithRuntimeVersion
type Left: ChainWithTransactions + ChainWithRuntimeVersion
The left relay chain.
Sourcetype Right: ChainWithTransactions + ChainWithRuntimeVersion
type Right: ChainWithTransactions + ChainWithRuntimeVersion
The right destination chain (it can be a relay or a parachain).
Required Methods§
Sourcefn common(&self) -> &Full2WayBridgeCommonParams<Self::Left, Self::Right>
fn common(&self) -> &Full2WayBridgeCommonParams<Self::Left, Self::Right>
Reference to common relay parameters.
Sourcefn mut_common(
&mut self,
) -> &mut Full2WayBridgeCommonParams<Self::Left, Self::Right>
fn mut_common( &mut self, ) -> &mut Full2WayBridgeCommonParams<Self::Left, Self::Right>
Mutable reference to common relay parameters.
Sourcefn start_on_demand_headers_relayers<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(Arc<dyn OnDemandRelay<Self::Left, Self::Right>>, Arc<dyn OnDemandRelay<Self::Right, Self::Left>>)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn start_on_demand_headers_relayers<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(Arc<dyn OnDemandRelay<Self::Left, Self::Right>>, Arc<dyn OnDemandRelay<Self::Right, Self::Left>>)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Start on-demand headers relays.
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.