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 config;
20mod contract;
21mod event;
22mod idents_lint;
23mod ink_test;
24mod item;
25mod item_impl;
26mod item_mod;
27mod selector;
28mod sha3;
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    AttributeArg,
48    AttributeArgKind,
49    AttributeFrag,
50    InkAttribute,
51    contains_ink_attributes,
52    first_ink_attribute,
53    partition_attributes,
54    sanitize_attributes,
55    sanitize_optional_attributes,
56};
57pub use self::{
58    attrs::{
59        IsDocAttribute,
60        Namespace,
61    },
62    blake2::{
63        Blake2x256Macro,
64        blake2b_256,
65    },
66    config::Config,
67    contract::Contract,
68    event::{
69        Event,
70        EventConfig,
71        SignatureTopic,
72    },
73    ink_test::InkTest,
74    item::{
75        InkItem,
76        Item,
77        Storage,
78    },
79    item_impl::{
80        Callable,
81        CallableKind,
82        CallableWithSelector,
83        Constructor,
84        ImplItem,
85        InputsIter,
86        ItemImpl,
87        IterConstructors,
88        IterMessages,
89        Message,
90        Receiver,
91        Visibility,
92    },
93    item_mod::{
94        ItemMod,
95        IterEvents,
96        IterItemImpls,
97    },
98    selector::{
99        Selector,
100        SelectorMacro,
101        TraitPrefix,
102    },
103    storage_item::StorageItem,
104    trait_def::{
105        InkItemTrait,
106        InkTraitDefinition,
107        InkTraitItem,
108        InkTraitMessage,
109        IterInkTraitItems,
110    },
111};