ink_ir/ir/
mod.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#![allow(dead_code)]
16
17mod attrs;
18mod blake2;
19mod chain_extension;
20mod config;
21mod contract;
22mod event;
23mod idents_lint;
24mod ink_test;
25mod item;
26mod item_impl;
27mod item_mod;
28mod selector;
29mod storage_item;
30mod trait_def;
31pub mod utils;
32
33const CFG_IDENT: &str = "cfg";
34
35/// Marker types and definitions.
36pub mod marker {
37    pub use super::selector::{
38        SelectorBytes,
39        SelectorId,
40    };
41}
42
43#[cfg(test)]
44use self::attrs::Attribute;
45
46use self::attrs::{
47    contains_ink_attributes,
48    first_ink_attribute,
49    partition_attributes,
50    sanitize_attributes,
51    sanitize_optional_attributes,
52    AttributeArg,
53    AttributeArgKind,
54    AttributeFrag,
55    InkAttribute,
56};
57pub use self::{
58    attrs::{
59        IsDocAttribute,
60        Namespace,
61    },
62    blake2::{
63        blake2b_256,
64        Blake2x256Macro,
65    },
66    chain_extension::{
67        ChainExtension,
68        ChainExtensionMethod,
69        ExtensionId,
70    },
71    config::Config,
72    contract::Contract,
73    event::{
74        Event,
75        SignatureTopicArg,
76    },
77    ink_test::InkTest,
78    item::{
79        InkItem,
80        Item,
81        Storage,
82    },
83    item_impl::{
84        Callable,
85        CallableKind,
86        CallableWithSelector,
87        Constructor,
88        ImplItem,
89        InputsIter,
90        ItemImpl,
91        IterConstructors,
92        IterMessages,
93        Message,
94        Receiver,
95        Visibility,
96    },
97    item_mod::{
98        ItemMod,
99        IterEvents,
100        IterItemImpls,
101    },
102    selector::{
103        Selector,
104        SelectorMacro,
105        TraitPrefix,
106    },
107    storage_item::StorageItem,
108    trait_def::{
109        InkItemTrait,
110        InkTraitDefinition,
111        InkTraitItem,
112        InkTraitMessage,
113        IterInkTraitItems,
114    },
115};