1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//! # Cross-contract calls
//!
//! This module is mostly used by the `#[contract]` macro, which
//! wraps each method implementation:
//!
//! - Fetch encoded arguments from the VM and decode them
//! - Run the method body
//! - Encode the result and return it to the VM
//!
//! The contract macro also constructs "client" stub-objects which
//! can be used to call other contracts with the provided trait interface.
//!
//! Generated clients expose three call styles:
//! - `client.method(...)`: success-oriented path; typed exceptions are
//! re-thrown and faults stay faults
//! - `client.try_method(...)`: inspection path;
//! `Result<ReturnType, CallError>`, where a caught exception stays an
//! untyped [`RawException`](crate::exn::RawException) to be matched with
//! [`match_exn!`](crate::match_exn)
//!
//! `client.map_exceptions(classify).try_method(...)` maps a borrowed exception
//! to a caller-chosen value, avoiding the owned buffer. See [`MapExceptions`].
//!
//! The procedure for a call is:
//!
//! - Encode arguments
//! - Call invoke syscall
//! - Decode result
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;