linera_sdk::views

Trait RootView

Source
pub trait RootView<C>: View<C> {
    // Required method
    fn save<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = Result<(), ViewError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
}
Expand description

A View whose staged modifications can be saved in storage.

Required Methods§

Source

fn save<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<(), ViewError>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Saves the root view to the database context

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<C> RootView<C> for ChainStateView<C>
where C: Clone + Context + Send + Sync + 'static,

Source§

fn save<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<(), ViewError>> + Send + 'async_trait>>
where 'life0: 'async_trait, ChainStateView<C>: 'async_trait,

Implementors§

Source§

impl<C> RootView<C> for TestBucketQueueView<C>
where C: Context + Send + Sync + Clone + 'static,

Source§

impl<C> RootView<C> for TestCollectionView<C>
where C: Context + Send + Sync + Clone + 'static,

Source§

impl<C> RootView<C> for TestLogView<C>
where C: Context + Send + Sync + Clone + 'static,

Source§

impl<C> RootView<C> for TestMapView<C>
where C: Context + Send + Sync + Clone + 'static,

Source§

impl<C> RootView<C> for TestQueueView<C>
where C: Context + Send + Sync + Clone + 'static,

Source§

impl<C> RootView<C> for TestRegisterView<C>
where C: Context + Send + Sync + Clone + 'static,

Source§

impl<C> RootView<C> for TestSetView<C>
where C: Context + Send + Sync + Clone + 'static,