Trait RootView

Source
pub trait RootView: View + Send {
    // Required methods
    fn save(&mut self) -> impl Future<Output = Result<(), ViewError>> + Send;
    fn save_and_drop(self) -> impl Future<Output = Result<(), ViewError>> + Send;
}
Expand description

A View whose staged modifications can be saved in storage.

Required Methods§

Source

fn save(&mut self) -> impl Future<Output = Result<(), ViewError>> + Send

Saves the root view to the database context

Source

fn save_and_drop(self) -> impl Future<Output = Result<(), ViewError>> + Send

Saves the root view to the database context and then drops it without calling post_save.

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

Source§

async fn save(&mut self) -> Result<(), ViewError>

Source§

async fn save_and_drop(self) -> Result<(), ViewError>

Implementors§