linera_sdk/views/
aliases.rs

1// Copyright (c) Zefchain Labs, Inc.
2// SPDX-License-Identifier: Apache-2.0
3
4//! Aliases for views using the [`ViewStorageContext`].
5
6use super::ViewStorageContext;
7
8/// An alias to [`linera_views::collection_view::ByteCollectionView`] that uses the
9/// WebAssembly-specific [`ViewStorageContext`].
10pub type ByteCollectionView<V> =
11    linera_views::collection_view::ByteCollectionView<ViewStorageContext, V>;
12
13/// An alias to [`linera_views::map_view::ByteMapView`] that uses the
14/// WebAssembly-specific [`ViewStorageContext`].
15pub type ByteMapView<V> = linera_views::map_view::ByteMapView<ViewStorageContext, V>;
16
17/// An alias to [`linera_views::set_view::ByteSetView`] that uses the WebAssembly-specific
18/// [`ViewStorageContext`].
19pub type ByteSetView = linera_views::set_view::ByteSetView<ViewStorageContext>;
20
21/// An alias to [`linera_views::collection_view::CollectionView`] that uses the
22/// WebAssembly-specific [`ViewStorageContext`].
23pub type CollectionView<K, V> =
24    linera_views::collection_view::CollectionView<ViewStorageContext, K, V>;
25
26/// An alias to [`linera_views::collection_view::CustomCollectionView`] that uses the
27/// WebAssembly-specific [`ViewStorageContext`].
28pub type CustomCollectionView<K, V> =
29    linera_views::collection_view::CustomCollectionView<ViewStorageContext, K, V>;
30
31/// An alias to [`linera_views::map_view::CustomMapView`] that uses the
32/// WebAssembly-specific [`ViewStorageContext`].
33pub type CustomMapView<K, V> = linera_views::map_view::CustomMapView<ViewStorageContext, K, V>;
34
35/// An alias to [`linera_views::set_view::CustomSetView`] that uses the
36/// WebAssembly-specific [`ViewStorageContext`].
37pub type CustomSetView<W> = linera_views::set_view::CustomSetView<ViewStorageContext, W>;
38
39/// An alias to [`linera_views::log_view::LogView`] that uses the WebAssembly-specific
40/// [`ViewStorageContext`].
41pub type LogView<T> = linera_views::log_view::LogView<ViewStorageContext, T>;
42
43/// An alias to [`linera_views::map_view::MapView`] that uses the WebAssembly-specific
44/// [`ViewStorageContext`].
45pub type MapView<K, V> = linera_views::map_view::MapView<ViewStorageContext, K, V>;
46
47/// An alias to [`linera_views::queue_view::QueueView`] that uses the WebAssembly-specific
48/// [`ViewStorageContext`].
49pub type QueueView<T> = linera_views::queue_view::QueueView<ViewStorageContext, T>;
50
51/// An alias to [`linera_views::collection_view::ReadGuardedView`] that uses the
52/// WebAssembly-specific [`ViewStorageContext`].
53pub type ReadGuardedView<'a, W> = linera_views::collection_view::ReadGuardedView<'a, W>;
54
55/// An alias to [`linera_views::register_view::RegisterView`] that uses the
56/// WebAssembly-specific [`ViewStorageContext`].
57pub type RegisterView<T> = linera_views::register_view::RegisterView<ViewStorageContext, T>;
58
59/// An alias to [`linera_views::set_view::SetView`] that uses the WebAssembly-specific
60/// [`ViewStorageContext`].
61pub type SetView<W> = linera_views::set_view::SetView<ViewStorageContext, W>;