1#[cfg(test)]
4mod tests;
5
6#[macro_use]
7mod macros;
8
9mod steps_between;
10use self::steps_between::StepsBetween;
11
12mod dynamic;
13pub use self::dynamic::{DynamicEmpty, DynamicStruct, DynamicTuple};
14
15mod access;
16pub use self::access::AccessError;
17pub(crate) use self::access::{Access, AccessErrorKind, RawAccessGuard, Snapshot};
18
19mod borrow_mut;
20pub use self::borrow_mut::BorrowMut;
21
22mod borrow_ref;
23pub use self::borrow_ref::BorrowRef;
24
25mod any_obj;
26use self::any_obj::AnyObjErrorKind;
27pub use self::any_obj::{AnyObj, AnyObjError};
28pub(crate) use self::any_obj::{AnyObjDrop, RawAnyObjGuard};
29
30mod args;
31pub use self::args::{Args, FixedArgs};
32pub(crate) use self::args::{DynArgs, DynArgsUsed, DynGuardedArgs};
33
34mod awaited;
35pub(crate) use self::awaited::Awaited;
36
37pub mod budget;
38
39mod bytes;
40pub use self::bytes::{bytes_slice_index_get, Bytes};
41
42mod call;
43pub use self::call::Call;
44
45mod const_value;
46pub use self::const_value::{
47 from_const_value, to_const_value, ConstConstruct, ConstValue, FromConstValue, ToConstValue,
48};
49pub(crate) use self::const_value::{ConstContext, ConstValueKind, EmptyConstContext};
50
51pub mod debug;
52pub use self::debug::{DebugInfo, DebugInst};
53
54mod env;
55
56pub mod format;
57pub use self::format::{Format, FormatSpec};
58
59mod from_value;
60#[allow(deprecated)]
61pub use self::from_value::UnsafeFromValue;
62pub use self::from_value::{from_value, FromValue, UnsafeToMut, UnsafeToRef};
63
64mod function;
65pub use self::function::{Function, SyncFunction};
66
67mod future;
68pub use self::future::Future;
69pub(crate) use self::future::SelectFuture;
70
71pub(crate) mod generator;
72pub use self::generator::Generator;
73
74mod generator_state;
75pub use self::generator_state::GeneratorState;
76
77mod guarded_args;
78pub use self::guarded_args::GuardedArgs;
79
80mod inst;
81pub use self::inst::{
82 Inst, InstAddress, InstArithmeticOp, InstBitwiseOp, InstOp, InstRange, InstShiftOp, InstTarget,
83 InstValue, InstVariant, IntoOutput, Output, PanicReason, TypeCheck,
84};
85
86mod iterator;
87pub use self::iterator::Iterator;
88
89mod type_;
90pub use self::type_::Type;
91
92mod label;
93pub use self::label::DebugLabel;
94pub(crate) use self::label::Label;
95
96pub(crate) mod object;
97pub use self::object::Object;
98
99mod panic;
100pub(crate) use self::panic::{BoxedPanic, Panic};
101
102mod protocol;
103pub use self::protocol::Protocol;
104
105mod protocol_caller;
106pub(crate) use self::protocol_caller::{EnvProtocolCaller, ProtocolCaller};
107
108pub(crate) mod range_from;
109pub use self::range_from::RangeFrom;
110
111mod range_full;
112pub use self::range_full::RangeFull;
113
114mod range_to_inclusive;
115pub use self::range_to_inclusive::RangeToInclusive;
116
117mod range_to;
118pub use self::range_to::RangeTo;
119
120pub(crate) mod range_inclusive;
121pub use self::range_inclusive::RangeInclusive;
122
123pub(crate) mod range;
124pub use self::range::Range;
125
126mod runtime_context;
127pub(crate) use self::runtime_context::FunctionHandler;
128pub use self::runtime_context::RuntimeContext;
129
130mod select;
131pub(crate) use self::select::Select;
132
133mod r#ref;
134use self::r#ref::RefVtable;
135pub use self::r#ref::{Mut, RawAnyGuard, Ref};
136
137mod stack;
138pub(crate) use self::stack::Pair;
139pub use self::stack::{Memory, SliceError, Stack, StackError};
140
141mod static_string;
142pub use self::static_string::StaticString;
143
144mod stream;
145pub use self::stream::Stream;
146
147mod to_value;
148pub use self::to_value::{to_value, ToReturn, ToValue, UnsafeToValue};
149
150mod tuple;
151pub use self::tuple::{OwnedTuple, Tuple};
152
153mod type_info;
154pub use self::type_info::{AnyTypeInfo, TypeInfo};
155
156mod type_of;
157pub use self::type_of::{MaybeTypeOf, TypeHash, TypeOf};
158
159pub mod unit;
160pub(crate) use self::unit::UnitFn;
161pub use self::unit::{Unit, UnitStorage};
162
163mod value;
164pub use self::value::{
165 Accessor, EmptyStruct, Inline, RawValueGuard, Rtti, Struct, TupleStruct, TypeValue, Value,
166 ValueMutGuard, ValueRefGuard,
167};
168pub(crate) use self::value::{Dynamic, DynamicTakeError, Repr, RttiKind};
169
170pub mod slice;
171
172mod vec;
173pub use self::vec::Vec;
174
175mod vec_tuple;
176pub use self::vec_tuple::VecTuple;
177
178mod vm;
179use self::vm::CallResultOnly;
180pub use self::vm::{CallFrame, Isolated, Vm};
181
182mod vm_call;
183pub(crate) use self::vm_call::VmCall;
184
185pub(crate) mod vm_diagnostics;
186pub(crate) use self::vm_diagnostics::{VmDiagnostics, VmDiagnosticsObj};
187
188mod vm_error;
189#[cfg(feature = "emit")]
190pub(crate) use self::vm_error::VmErrorAt;
191pub use self::vm_error::{try_result, RuntimeError, TryFromResult, VmError, VmResult};
192pub(crate) use self::vm_error::{VmErrorKind, VmIntegerRepr};
193
194mod vm_execution;
195pub(crate) use self::vm_execution::ExecutionState;
196pub use self::vm_execution::{VmExecution, VmSendExecution};
197
198mod vm_halt;
199pub(crate) use self::vm_halt::{VmHalt, VmHaltInfo};
200
201mod fmt;
202pub use self::fmt::Formatter;
203
204mod control_flow;
205pub use self::control_flow::ControlFlow;
206
207#[cfg(feature = "alloc")]
208mod hasher;
209#[cfg(feature = "alloc")]
210pub use self::hasher::Hasher;
211
212pub(crate) type FieldMap<K, V> = crate::alloc::HashMap<K, V>;
213
214#[inline(always)]
215pub(crate) fn new_field_map<K, V>() -> FieldMap<K, V> {
216 FieldMap::new()
217}
218
219#[inline(always)]
220pub(crate) fn new_field_hash_map_with_capacity<K, V>(
221 cap: usize,
222) -> crate::alloc::Result<FieldMap<K, V>> {
223 FieldMap::try_with_capacity(cap)
224}