Type Alias ReadGuardedView

Source
pub type ReadGuardedView<'a, W> = ReadGuardedView<'a, W>;
Expand description

An alias to linera_views::collection_view::ReadGuardedView that uses the WebAssembly-specific ViewStorageContext.

Aliased Type§

enum ReadGuardedView<'a, W> {
    Loaded {
        updates: RwLockReadGuard<'a, BTreeMap<Vec<u8>, Update<W>>>,
        short_key: Vec<u8>,
    },
    NotLoaded {
        _updates: RwLockReadGuard<'a, BTreeMap<Vec<u8>, Update<W>>>,
        view: W,
    },
}

Variants§

§

Loaded

The view is loaded in the updates

Fields

§updates: RwLockReadGuard<'a, BTreeMap<Vec<u8>, Update<W>>>

The guard for the updates.

§short_key: Vec<u8>

The key in question.

§

NotLoaded

The view is not loaded in the updates

Fields

§_updates: RwLockReadGuard<'a, BTreeMap<Vec<u8>, Update<W>>>

The guard for the updates. It is needed so that it prevents opening the view as write separately.

§view: W

The view obtained from the storage