Module oasis_runtime_sdk::modules::rofl::app
source · Expand description
Wrapper to make development of ROFL components easier.
+pub trait App: Send + Sync + 'static {
+App in oasis_runtime_sdk::modules::rofl::app - Rust pub trait App: Send + Sync + 'static {
const VERSION: Version;
// Provided methods
@@ -6,6 +6,11 @@
fn consensus_trust_root() -> Option<TrustRoot> { ... }
fn new_transaction<B>(&self, method: &str, body: B) -> Transaction
where B: Encode { ... }
+ fn post_registration_init<'async_trait>(
+ self: Arc<Self>,
+ env: Environment<Self>,
+ ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
+ where Self: Sized + 'async_trait { ... }
fn run<'async_trait>(
self: Arc<Self>,
env: Environment<Self>,
@@ -26,17 +31,25 @@
verification will not be performed.
sourcefn new_transaction<B>(&self, method: &str, body: B) -> Transactionwhere
B: Encode,
Create a new unsigned transaction.
-
sourcefn post_registration_init<'async_trait>(
+ self: Arc<Self>,
+ env: Environment<Self>,
+) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
+ Self: Sized + 'async_trait,
fn post_registration_init<'async_trait>(
+ self: Arc<Self>,
+ env: Environment<Self>,
+) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
+ Self: Sized + 'async_trait,
Custom post-registration initialization. It runs before any image-specific scripts are +called by the runtime so it can be used to do things like set up custom storage after +successful registration.
+Until this function completes, no further initialization will happen.
+sourcefn run<'async_trait>(
self: Arc<Self>,
env: Environment<Self>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: Sized + 'async_trait,
fn run<'async_trait>(
self: Arc<Self>,
env: Environment<Self>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: Sized + 'async_trait,
Main application processing loop.
-