pub trait SendToAssetHub {
type AccountId;
// Required methods
fn relay_session_report(session_report: SessionReport<Self::AccountId>);
fn relay_new_offence(
session_index: SessionIndex,
offences: Vec<Offence<Self::AccountId>>,
);
}
Expand description
The interface to communicate to asset hub.
This trait should only encapsulate our outgoing communications. Any incoming message is handled
with Call
s.
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>)
fn relay_session_report(session_report: SessionReport<Self::AccountId>)
Report a session change to AssetHub.
Sourcefn relay_new_offence(
session_index: SessionIndex,
offences: Vec<Offence<Self::AccountId>>,
)
fn relay_new_offence( session_index: SessionIndex, offences: Vec<Offence<Self::AccountId>>, )
Report new offences.
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 ()
impl SendToAssetHub for ()
A no-op implementation of SendToAssetHub
.