From f175a62c03b64f0e44598c3f85dba4ae202c1600 Mon Sep 17 00:00:00 2001 From: Anselm Eickhoff Date: Wed, 10 Oct 2018 14:03:03 +0200 Subject: [PATCH] Add possibility to register trait messages --- Cargo.toml | 2 +- src/actor_system.rs | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index a52d82c..7d6e381 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "kay" description = "Experimental high-performance actor system framework for Rust" -version = "0.2.23" +version = "0.2.24" authors = ["Anselm Eickhoff "] repository = "https://github.com/aeickhoff/kay" license = "MIT" diff --git a/src/actor_system.rs b/src/actor_system.rs index 45184a5..6af73c8 100644 --- a/src/actor_system.rs +++ b/src/actor_system.rs @@ -175,6 +175,12 @@ impl ActorSystem { let _actor_id = self.actor_registry.get_or_register::(); } + /// Register a message type that might first only appear in an actor trait + /// and that might never have an actual handler implementation on this node kind + pub fn register_trait_message(&mut self) { + self.message_registry.get_or_register::(); + } + /// Register a handler for an Actor type and Message type. pub fn add_handler Fate + 'static>( &mut self,