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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
//! # Core wasmCloud Actor Interface
//!
//! This crate contains the data types required by all actors, namely the health check request and
//! health check response, and [CapabilityConfiguration](struct.CapabilityConfiguration.html), a struct used
//! by capability providers to receive link data for an actor.
//!
//! If you use the `init` macro, then a default health check handler will be created for you, as shown in
//! this example. If you want to provide your own custom health check handler, then simply call
//! `Handlers::register_health_check` with your handler function.
//!
//! # Example
//! ```
//! extern crate wasmcloud_actor_core as actor;
//!
//! #[actor::init]
//! pub fn init() {
//! // register handlers here
//! }
//! ```
//!
//! # Caveat
//! Your `init` function is called by the wasmcloud host runtime when the actor is first loaded into the host. This function
//! is only ever called once, and _is called before any provider linking takes place_. In other words, code written inside this
//! function cannot communicate with capability providers.
//!
//! Also, in keeping with the notion of _stateless_ actors, avoid using this function to initialize or create global state.
pub use *;
use ;
/// Performs an actor-to-actor call, with the target actor identified by a reference string. This
/// reference can be an OCI image URL, a 56-character public key (subject), or, if one is defined,
/// a developer-friendly call alias
pub use init;