acton_core/lib.rs
1/*
2 * Copyright (c) 2024. Govcraft
3 *
4 * Licensed under either of
5 * * Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
8 * * MIT license: http://opensource.org/licenses/MIT
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the applicable License for the specific language governing permissions and
14 * limitations under that License.
15 */
16
17#![forbid(unsafe_code)]
18#![forbid(missing_docs)]
19#![forbid(dead_code)]
20// #![forbid(unused_imports)]
21//! Acton Core Library
22//!
23//! This library provides the core functionality for the Acton actor framework.
24//! It includes common utilities, trait definitions, and prelude exports.
25
26/// Common utilities and structures used throughout the Acton framework.
27pub(crate) mod common;
28
29pub(crate) mod actor;
30pub(crate) mod message;
31/// Trait definitions used in the Acton framework.
32pub(crate) mod traits;
33
34/// Prelude module for convenient imports.
35///
36/// This module re-exports commonly used items from the `common` and `traits` modules,
37/// as well as the `async_trait` crate.
38pub mod prelude {
39 pub use acton_ern::*;
40 pub use async_trait;
41
42 pub use crate::actor::{AgentConfig, Idle, ManagedAgent, Started};
43 pub use crate::common::{ActonApp, AgentBroker, AgentHandle, AgentReply, AgentRuntime};
44 pub use crate::message::{BrokerRequest, BrokerRequestEnvelope, MessageAddress, OutboundEnvelope};
45 pub use crate::traits::{ActonMessage, Actor, Broker, Subscribable, Subscriber};
46}