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