ink_engine/
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#![doc(
16    html_logo_url = "https://use.ink/img/crate-docs/logo.png",
17    html_favicon_url = "https://use.ink/crate-docs/favicon.png"
18)]
19
20pub mod ext;
21pub mod test_api;
22
23mod chain_extension;
24mod database;
25mod exec_context;
26mod hashing;
27mod types;
28
29#[cfg(test)]
30mod tests;
31
32pub use chain_extension::ChainExtension;
33pub use types::AccountError;
34
35use derive_more::From;
36
37/// Errors which can happen when interacting with this crate.
38#[derive(Debug, From, PartialEq, Eq)]
39pub enum Error {
40    Account(AccountError),
41    #[from(ignore)]
42    UninitializedBlocks,
43    #[from(ignore)]
44    UninitializedExecutionContext,
45    #[from(ignore)]
46    UnregisteredChainExtension,
47}