ink_storage/lib.rs
1// Copyright (C) Use Ink (UK) Ltd.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15//! The `ink_storage` utilities used to manipulate and organize contract storage.
16//!
17//! Mainly provides entities to work on a contract's storage
18//! as well as high-level collections on top of those.
19//! Also provides environmental utilities, such as storage allocators,
20//! FFI to interface with FRAME contracts and a primitive blockchain
21//! emulator for simple off-chain testing.
22
23#![doc(
24 html_logo_url = "https://use.ink/img/crate-docs/logo.png",
25 html_favicon_url = "https://use.ink/crate-docs/favicon.png"
26)]
27#![cfg_attr(not(feature = "std"), no_std)]
28#![deny(
29 missing_docs,
30 bad_style,
31 bare_trait_objects,
32 improper_ctypes,
33 non_shorthand_field_patterns,
34 no_mangle_generic_items,
35 overflowing_literals,
36 path_statements,
37 patterns_in_fns_without_body,
38 unconditional_recursion,
39 unused_allocation,
40 unused_comparisons,
41 unused_parens,
42 while_true,
43 trivial_casts,
44 trivial_numeric_casts,
45 unused_extern_crates
46)]
47
48pub use ink_storage_traits as traits;
49
50#[allow(dead_code)]
51pub(crate) mod lazy;
52
53#[doc(inline)]
54pub use self::lazy::{
55 Lazy,
56 Mapping,
57 StorageVec,
58};