Skip to main content

Crate cruster

Crate cruster 

Source
Expand description

Autopilot cluster entity framework.

use cruster::{entity, entity_impl};
use cruster::error::ClusterError;

struct NotSerializable {
    value: std::cell::Cell<i32>,
}

#[entity]
#[derive(Clone)]
struct BadEntity;

#[entity_impl]
impl BadEntity {
    #[workflow]
    async fn bad(&self, value: NotSerializable) -> Result<(), ClusterError> {
        let _ = value;
        Ok(())
    }
}

Modules§

config
cron
Cluster cron job scheduling.
entity
entity_client
entity_manager
entity_reaper
entity_resource
envelope
error
hash
message
message_storage
metrics
prelude
Prelude module for convenient glob imports.
reply
resource_map
runner
runner_health
runner_storage
runners
schema
Cluster annotations for RPC definitions.
shard_assigner
sharding
sharding_impl
singleton
Singleton registration helper.
snowflake
state_guard
State mutation guard for entity state access.
storage
testing
In-memory test cluster for unit and integration testing.
transport
types

Attribute Macros§

entity
Re-export proc macros for entity definition. Attribute macro for entity struct definitions.
entity_impl
Re-export proc macros for entity definition. Attribute macro for entity impl blocks.
entity_trait
Re-export proc macros for entity definition. Attribute macro for trait capability struct definitions.
entity_trait_impl
Re-export proc macros for entity definition. Attribute macro for trait capability impl blocks.