pub trait SendToAssetHub {
type AccountId;
// Required methods
fn relay_session_report(
session_report: SessionReport<Self::AccountId>,
) -> Result<(), ()>;
fn relay_new_offence_paged(
offences: Vec<(SessionIndex, Offence<Self::AccountId>)>,
) -> Result<(), ()>;
}Expand description
The interface to communicate to asset hub.
This trait should only encapsulate our outgoing communications. Any incoming message is handled
with Calls.
In a real runtime, this is implemented via XCM calls, much like how the coretime pallet works. In a test runtime, it can be wired to direct function call.
Required Associated Types§
Required Methods§
Sourcefn relay_session_report(
session_report: SessionReport<Self::AccountId>,
) -> Result<(), ()>
fn relay_session_report( session_report: SessionReport<Self::AccountId>, ) -> Result<(), ()>
Report a session change to AssetHub.
Returning Err(()) means the DMP queue is full, and you should try again in the next block.
fn relay_new_offence_paged( offences: Vec<(SessionIndex, Offence<Self::AccountId>)>, ) -> Result<(), ()>
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.
Implementations on Foreign Types§
Source§impl SendToAssetHub for ()
Available on crate feature std only.A no-op implementation of SendToAssetHub.
impl SendToAssetHub for ()
Available on crate feature
std only.A no-op implementation of SendToAssetHub.