Repository: slawlor/ractor
Pull request #27 (2023-01-14 15:32:08)

Cleanup trait definitions
This change renames `ActorHandler` to `Actor` and `Actor` to `ActorRuntime`. This is helpful because 90% of what people will work with is just the trait definition, which `Actor` is more logical than the "handler" naming scheme.

Additionally we can avoid existing breakages by re-defining on the `Actor{Handler}` trait the `spawn` and `spawn_linked` calls such that anyone already calling `Actor::spawn` doesn't have to change any syntax.

codecov-commenter: # [Codecov](https://codecov.io/gh/slawlor/ractor/pull/27?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Sean+Lawlor) Report
Base: **83.71**% // Head: **83.81**% // Increases project coverage by **`+0.09%`** :tada:
> Coverage data is based on head [(`b59f2ea`)](https://codecov.io/gh/slawlor/ractor/pull/27?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Sean+Lawlor) compared to base [(`f60d577`)](https://codecov.io/gh/slawlor/ractor/commit/f60d577f61d1c24369f34a272c3f08812f9febf9?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Sean+Lawlor).
> Patch coverage: 95.00% of modified lines in pull request are covered.

> :exclamation: Current head b59f2ea differs from pull request most recent head a2252e2. Consider uploading reports for the commit a2252e2 to get more accurate results

<details><summary>Additional details and impacted files</summary>


```diff
@@            Coverage Diff             @@
##             main      #27      +/-   ##
==========================================
+ Coverage   83.71%   83.81%   +0.09%     
==========================================
  Files          23       23              
  Lines        2186     2199      +13     
==========================================
+ Hits         1830     1843      +13     
  Misses        356      356              
```


| [Impacted Files](https://codecov.io/gh/slawlor/ractor/pull/27?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Sean+Lawlor) | Coverage Δ | |
|---|---|---|
| [ractor/src/actor/actor\_cell/actor\_ref.rs](https://codecov.io/gh/slawlor/ractor/pull/27?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Sean+Lawlor#diff-cmFjdG9yL3NyYy9hY3Rvci9hY3Rvcl9jZWxsL2FjdG9yX3JlZi5ycw==) | `75.00% <ø> (ø)` | |
| [ractor/src/actor/supervision.rs](https://codecov.io/gh/slawlor/ractor/pull/27?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Sean+Lawlor#diff-cmFjdG9yL3NyYy9hY3Rvci9zdXBlcnZpc2lvbi5ycw==) | `67.30% <ø> (ø)` | |
| [ractor/src/actor/tests/mod.rs](https://codecov.io/gh/slawlor/ractor/pull/27?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Sean+Lawlor#diff-cmFjdG9yL3NyYy9hY3Rvci90ZXN0cy9tb2QucnM=) | `95.38% <ø> (ø)` | |
| [ractor/src/lib.rs](https://codecov.io/gh/slawlor/ractor/pull/27?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Sean+Lawlor#diff-cmFjdG9yL3NyYy9saWIucnM=) | `100.00% <ø> (ø)` | |
| [ractor/src/pg/tests.rs](https://codecov.io/gh/slawlor/ractor/pull/27?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Sean+Lawlor#diff-cmFjdG9yL3NyYy9wZy90ZXN0cy5ycw==) | `95.42% <ø> (ø)` | |
| [ractor/src/port/output/tests.rs](https://codecov.io/gh/slawlor/ractor/pull/27?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Sean+Lawlor#diff-cmFjdG9yL3NyYy9wb3J0L291dHB1dC90ZXN0cy5ycw==) | `96.47% <ø> (ø)` | |
| [ractor/src/registry/mod.rs](https://codecov.io/gh/slawlor/ractor/pull/27?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Sean+Lawlor#diff-cmFjdG9yL3NyYy9yZWdpc3RyeS9tb2QucnM=) | `81.81% <ø> (ø)` | |
| [ractor/src/registry/tests.rs](https://codecov.io/gh/slawlor/ractor/pull/27?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Sean+Lawlor#diff-cmFjdG9yL3NyYy9yZWdpc3RyeS90ZXN0cy5ycw==) | `93.18% <ø> (ø)` | |
| [ractor/src/time/tests.rs](https://codecov.io/gh/slawlor/ractor/pull/27?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Sean+Lawlor#diff-cmFjdG9yL3NyYy90aW1lL3Rlc3RzLnJz) | `95.93% <ø> (ø)` | |
| [ractor/src/time/mod.rs](https://codecov.io/gh/slawlor/ractor/pull/27?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Sean+Lawlor#diff-cmFjdG9yL3NyYy90aW1lL21vZC5ycw==) | `65.51% <66.66%> (ø)` | |
| ... and [7 more](https://codecov.io/gh/slawlor/ractor/pull/27?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Sean+Lawlor) | |

Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Sean+Lawlor). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Sean+Lawlor)

</details>

[:umbrella: View full report at Codecov](https://codecov.io/gh/slawlor/ractor/pull/27?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Sean+Lawlor).   
:loudspeaker: Do you have feedback about the report comment? [Let us know in this issue](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Sean+Lawlor).


Patch:
diff --git a/README.md b/README.md
index 91342c5..7697e47 100644
--- a/README.md
+++ b/README.md
@@ -56,7 +56,7 @@ never be executed in parallel. Following the actor model leads to microservices
 An example `ping-pong` actor might be the following
 
 ```rust
-use ractor::{Actor, ActorCell, ActorHandler};
+use ractor::{Actor, ActorCell};
 
 /// [PingPong] is a basic actor that will print
 /// ping..pong.. repeatedly until some exit
@@ -90,7 +90,7 @@ impl Message {
 
 // the implementation of our actor's "logic"
 #[async_trait::async_trait]
-impl ActorHandler for PingPong {
+impl Actor for PingPong {
     // An actor has a message type
     type Msg = Message;
     // and (optionally) internal state
diff --git a/ractor-playground/src/ping_pong.rs b/ractor-playground/src/ping_pong.rs
index 487963f..d7f4f32 100644
--- a/ractor-playground/src/ping_pong.rs
+++ b/ractor-playground/src/ping_pong.rs
@@ -5,7 +5,7 @@
 
 //! A ping-pong actor implementation
 
-use ractor::{ActorHandler, ActorRef};
+use ractor::{Actor, ActorRef};
 
 pub struct PingPong;
 
@@ -32,7 +32,7 @@ impl Message {
 }
 
 #[async_trait::async_trait]
-impl ActorHandler for PingPong {
+impl Actor for PingPong {
     type Msg = Message;
 
     type State = u8;
diff --git a/ractor/Cargo.toml b/ractor/Cargo.toml
index 4005c55..237ffb0 100644
--- a/ractor/Cargo.toml
+++ b/ractor/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "ractor"
-version = "0.3.2"
+version = "0.4.0"
 authors = ["Sean Lawlor", "Evan Au", "Dillon George"]
 description = "A actor framework for Rust"
 documentation = "https://docs.rs/ractor"
diff --git a/ractor/benches/actor.rs b/ractor/benches/actor.rs
index 8a3398d..9268ab4 100644
--- a/ractor/benches/actor.rs
+++ b/ractor/benches/actor.rs
@@ -7,12 +7,12 @@
 extern crate criterion;
 
 use criterion::{BatchSize, Criterion};
-use ractor::{Actor, ActorHandler, ActorRef};
+use ractor::{Actor, ActorRef};
 
 struct BenchActor;
 
 #[async_trait::async_trait]
-impl ActorHandler for BenchActor {
+impl Actor for BenchActor {
     type Msg = ();
 
     type State = ();
@@ -137,7 +137,7 @@ fn process_messages(c: &mut Criterion) {
     }
 
     #[async_trait::async_trait]
-    impl ActorHandler for MessagingActor {
+    impl Actor for MessagingActor {
         type Msg = ();
 
         type State = u64;
diff --git a/ractor/examples/counter.rs b/ractor/examples/counter.rs
index 8c0045a..c38eff4 100644
--- a/ractor/examples/counter.rs
+++ b/ractor/examples/counter.rs
@@ -14,7 +14,7 @@
 
 extern crate ractor;
 
-use ractor::{Actor, ActorHandler, ActorRef, RpcReplyPort};
+use ractor::{Actor, ActorRef, RpcReplyPort};
 use tokio::time::Duration;
 
 struct Counter;
@@ -31,7 +31,7 @@ enum CounterMessage {
 }
 
 #[async_trait::async_trait]
-impl ActorHandler for Counter {
+impl Actor for Counter {
     type Msg = CounterMessage;
 
     type State = CounterState;
diff --git a/ractor/examples/monte_carlo.rs b/ractor/examples/monte_carlo.rs
index 17ce461..78af0f5 100644
--- a/ractor/examples/monte_carlo.rs
+++ b/ractor/examples/monte_carlo.rs
@@ -17,7 +17,7 @@
 
 use std::collections::HashMap;
 
-use ractor::{Actor, ActorHandler, ActorId, ActorRef};
+use ractor::{Actor, ActorId, ActorRef};
 use rand::{thread_rng, Rng};
 
 // ================== Player Actor ================== //
@@ -60,7 +60,7 @@ impl GameState {
 struct Game;
 
 #[async_trait::async_trait]
-impl ActorHandler for Game {
+impl Actor for Game {
     type Msg = ActorRef<GameManager>;
 
     type State = GameState;
@@ -122,7 +122,7 @@ impl GameManagerState {
 }
 
 #[async_trait::async_trait]
-impl ActorHandler for GameManager {
+impl Actor for GameManager {
     type Msg = GameManagerMessage;
 
     type State = GameManagerState;
diff --git a/ractor/examples/output_port.rs b/ractor/examples/output_port.rs
index 46bc301..f950ab7 100644
--- a/ractor/examples/output_port.rs
+++ b/ractor/examples/output_port.rs
@@ -15,7 +15,7 @@ extern crate ractor;
 
 use std::sync::Arc;
 
-use ractor::{Actor, ActorHandler, ActorRef, OutputPort};
+use ractor::{Actor, ActorRef, OutputPort};
 use tokio::time::{timeout, Duration};
 
 enum PublisherMessage {
@@ -27,7 +27,7 @@ struct Publisher {
 }
 
 #[async_trait::async_trait]
-impl ActorHandler for Publisher {
+impl Actor for Publisher {
     type Msg = PublisherMessage;
 
     type State = ();
@@ -51,7 +51,7 @@ enum SubscriberMessage {
 }
 
 #[async_trait::async_trait]
-impl ActorHandler for Subscriber {
+impl Actor for Subscriber {
     type Msg = SubscriberMessage;
 
     type State = ();
diff --git a/ractor/examples/philosophers.rs b/ractor/examples/philosophers.rs
index c5c29b9..8a2a5ca 100644
--- a/ractor/examples/philosophers.rs
+++ b/ractor/examples/philosophers.rs
@@ -20,7 +20,7 @@
 
 use std::collections::{HashMap, VecDeque};
 
-use ractor::{Actor, ActorHandler, ActorId, ActorName, ActorRef, RpcReplyPort};
+use ractor::{Actor, ActorId, ActorName, ActorRef, RpcReplyPort};
 use tokio::time::{Duration, Instant};
 
 // ============================ Fork Actor ============================ //
@@ -114,7 +114,7 @@ impl Fork {
 }
 
 #[async_trait::async_trait]
-impl ActorHandler for Fork {
+impl Actor for Fork {
     type Msg = ForkMessage;
     type State = ForkState;
     async fn pre_start(&self, _myself: ActorRef<Self>) -> Self::State {
@@ -299,7 +299,7 @@ impl Philosopher {
 }
 
 #[async_trait::async_trait]
-impl ActorHandler for Philosopher {
+impl Actor for Philosopher {
     type Msg = PhilosopherMessage;
     type State = PhilosopherState;
     async fn pre_start(&self, myself: ActorRef<Self>) -> Self::State {
diff --git a/ractor/examples/ping_pong.rs b/ractor/examples/ping_pong.rs
index 956471d..22ec7d0 100644
--- a/ractor/examples/ping_pong.rs
+++ b/ractor/examples/ping_pong.rs
@@ -14,7 +14,7 @@
 
 extern crate ractor;
 
-use ractor::{Actor, ActorHandler, ActorRef};
+use ractor::{Actor, ActorRef};
 
 pub struct PingPong;
 
@@ -41,7 +41,7 @@ impl Message {
 }
 
 #[async_trait::async_trait]
-impl ActorHandler for PingPong {
+impl Actor for PingPong {
     type Msg = Message;
 
     type State = u8;
diff --git a/ractor/examples/supervisor.rs b/ractor/examples/supervisor.rs
index 04b2c70..13ce010 100644
--- a/ractor/examples/supervisor.rs
+++ b/ractor/examples/supervisor.rs
@@ -11,7 +11,7 @@
 //! cargo run --example supervisor
 //! ```
 
-use ractor::{Actor, ActorHandler, ActorRef, RpcReplyPort, SupervisionEvent};
+use ractor::{Actor, ActorRef, RpcReplyPort, SupervisionEvent};
 
 use tokio::time::Duration;
 
@@ -67,7 +67,7 @@ enum LeafActorMessage {
 }
 
 #[async_trait::async_trait]
-impl ActorHandler for LeafActor {
+impl Actor for LeafActor {
     type Msg = LeafActorMessage;
     type State = LeafActorState;
     async fn pre_start(&self, _myself: ActorRef<Self>) -> Self::State {
@@ -117,7 +117,7 @@ enum MidLevelActorMessage {
 }
 
 #[async_trait::async_trait]
-impl ActorHandler for MidLevelActor {
+impl Actor for MidLevelActor {
     type Msg = MidLevelActorMessage;
     type State = MidLevelActorState;
 
@@ -189,7 +189,7 @@ enum RootActorMessage {
 }
 
 #[async_trait::async_trait]
-impl ActorHandler for RootActor {
+impl Actor for RootActor {
     type Msg = RootActorMessage;
     type State = RootActorState;
 
diff --git a/ractor/src/actor/actor_cell/actor_properties.rs b/ractor/src/actor/actor_cell/actor_properties.rs
index a2c9f12..46ef5b6 100644
--- a/ractor/src/actor/actor_cell/actor_properties.rs
+++ b/ractor/src/actor/actor_cell/actor_properties.rs
@@ -11,9 +11,7 @@ use tokio::sync::mpsc;
 use crate::actor::messages::{BoxedMessage, StopMessage};
 use crate::actor::supervision::SupervisionTree;
 use crate::port::{BoundedInputPort, BoundedInputPortReceiver, InputPort, InputPortReceiver};
-use crate::{
-    ActorHandler, ActorId, ActorName, ActorStatus, MessagingErr, Signal, SupervisionEvent,
-};
+use crate::{Actor, ActorId, ActorName, ActorStatus, MessagingErr, Signal, SupervisionEvent};
 
 // The inner-properties of an Actor
 pub(crate) struct ActorProperties {
@@ -39,7 +37,7 @@ impl ActorProperties {
         InputPortReceiver<BoxedMessage>,
     )
     where
-        TActor: ActorHandler,
+        TActor: Actor,
     {
         let (tx_signal, rx_signal) = mpsc::channel(2);
         let (tx_stop, rx_stop) = mpsc::channel(2);
@@ -89,7 +87,7 @@ impl ActorProperties {
 
     pub fn send_message<TActor>(&self, message: TActor::Msg) -> Result<(), MessagingErr>
     where
-        TActor: ActorHandler,
+        TActor: Actor,
     {
         if self.type_id != std::any::TypeId::of::<TActor>() {
             return Err(MessagingErr::InvalidActorType);
diff --git a/ractor/src/actor/actor_cell/actor_ref.rs b/ractor/src/actor/actor_cell/actor_ref.rs
index 070905f..e8456e6 100644
--- a/ractor/src/actor/actor_cell/actor_ref.rs
+++ b/ractor/src/actor/actor_cell/actor_ref.rs
@@ -8,7 +8,7 @@
 use std::any::TypeId;
 use std::marker::PhantomData;
 
-use crate::{ActorHandler, ActorName, MessagingErr, SupervisionEvent};
+use crate::{Actor, ActorName, MessagingErr, SupervisionEvent};
 
 use super::ActorCell;
 
@@ -17,7 +17,7 @@ use super::ActorCell;
 /// the actor type everywhere
 pub struct ActorRef<TActor>
 where
-    TActor: ActorHandler,
+    TActor: Actor,
 {
     pub(crate) inner: ActorCell,
     _tactor: PhantomData<TActor>,
@@ -25,7 +25,7 @@ where
 
 impl<TActor> Clone for ActorRef<TActor>
 where
-    TActor: ActorHandler,
+    TActor: Actor,
 {
     fn clone(&self) -> Self {
         ActorRef {
@@ -37,7 +37,7 @@ where
 
 impl<TActor> std::ops::Deref for ActorRef<TActor>
 where
-    TActor: ActorHandler,
+    TActor: Actor,
 {
     type Target = ActorCell;
 
@@ -48,7 +48,7 @@ where
 
 impl<TActor> From<ActorCell> for ActorRef<TActor>
 where
-    TActor: ActorHandler,
+    TActor: Actor,
 {
     fn from(value: ActorCell) -> Self {
         Self {
@@ -60,7 +60,7 @@ where
 
 impl<TActor> From<ActorRef<TActor>> for ActorCell
 where
-    TActor: ActorHandler,
+    TActor: Actor,
 {
     fn from(value: ActorRef<TActor>) -> Self {
         value.inner
@@ -69,7 +69,7 @@ where
 
 impl<TActor> std::fmt::Debug for ActorRef<TActor>
 where
-    TActor: ActorHandler,
+    TActor: Actor,
 {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         write!(f, "{:?}", self.inner)
@@ -78,7 +78,7 @@ where
 
 impl<TActor> ActorRef<TActor>
 where
-    TActor: ActorHandler,
+    TActor: Actor,
 {
     /// Retrieve a cloned [ActorCell] representing this [ActorRef]
     pub fn get_cell(&self) -> ActorCell {
diff --git a/ractor/src/actor/actor_cell/mod.rs b/ractor/src/actor/actor_cell/mod.rs
index c8d915f..960f137 100644
--- a/ractor/src/actor/actor_cell/mod.rs
+++ b/ractor/src/actor/actor_cell/mod.rs
@@ -16,7 +16,7 @@ use super::messages::{BoxedMessage, Signal, StopMessage};
 
 use super::SupervisionEvent;
 use crate::port::{BoundedInputPortReceiver, InputPortReceiver};
-use crate::{ActorHandler, ActorId, ActorName, SpawnErr};
+use crate::{Actor, ActorId, ActorName, SpawnErr};
 
 pub mod actor_ref;
 pub use actor_ref::ActorRef;
@@ -156,7 +156,7 @@ impl ActorCell {
     /// Returns a tuple [(ActorCell, ActorPortSet)] to bootstrap the [crate::Actor]
     pub(crate) fn new<TActor>(name: Option<ActorName>) -> Result<(Self, ActorPortSet), SpawnErr>
     where
-        TActor: ActorHandler,
+        TActor: Actor,
     {
         let (props, rx1, rx2, rx3, rx4) = ActorProperties::new::<TActor>(name);
         let cell = Self {
@@ -284,7 +284,7 @@ impl ActorCell {
     /// Returns [Ok(())] on successful message send, [Err(MessagingErr)] otherwise
     pub fn send_message<TActor>(&self, message: TActor::Msg) -> Result<(), MessagingErr>
     where
-        TActor: ActorHandler,
+        TActor: Actor,
     {
         self.inner.send_message::<TActor>(message)
     }
@@ -294,7 +294,7 @@ impl ActorCell {
     /// * `evt` - The event to send to this [super::Actor]'s supervisors
     pub fn notify_supervisor<TActor>(&self, evt: SupervisionEvent)
     where
-        TActor: ActorHandler,
+        TActor: Actor,
     {
         self.inner.tree.notify_supervisor::<TActor>(evt)
     }
diff --git a/ractor/src/actor/mod.rs b/ractor/src/actor/mod.rs
index bacd884..b779803 100644
--- a/ractor/src/actor/mod.rs
+++ b/ractor/src/actor/mod.rs
@@ -6,7 +6,7 @@
 //! This module contains the basic building blocks of an actor.
 //!
 //! They are:
-//! [ActorHandler]: The behavior definition for an actor's internal processing logic + state management
+//! [Actor]: The behavior definition for an actor's internal processing logic + state management
 //! [Actor]: Management structure processing the message handler, signals, and supervision events in a loop
 
 use std::{panic::AssertUnwindSafe, sync::Arc};
@@ -38,10 +38,13 @@ pub(crate) fn get_panic_string(e: Box<dyn std::any::Any + Send>) -> String {
     }
 }
 
-/// [ActorHandler] is the "business logic" of an Actor. It defines the
+/// [Actor] defines the behavior of an Actor. It specifies the
 /// Message type, State type, and all processing logic for the actor
+///
+/// Additionally it aliases the calls for `spawn` and `spawn_linked` from
+/// [ActorRuntime] for convenient startup + lifecycle management
 #[async_trait::async_trait]
-pub trait ActorHandler: Sized + Sync + Send + 'static {
+pub trait Actor: Sized + Sync + Send + 'static {
     /// The message type for this actor
     type Msg: Message;
 
@@ -59,7 +62,7 @@ pub trait ActorHandler: Sized + Sync + Send + 'static {
     ///
     /// * `myself` - A handle to the [ActorCell] representing this actor
     ///
-    /// Returns an initial [ActorHandler::State] to bootstrap the actor
+    /// Returns an initial [Actor::State] to bootstrap the actor
     async fn pre_start(&self, myself: ActorRef<Self>) -> Self::State;
 
     /// Invoked after an actor has started.
@@ -108,30 +111,62 @@ pub trait ActorHandler: Sized + Sync + Send + 'static {
         state: &mut Self::State,
     ) {
     }
+
+    /// Spawn an actor of this type, which is unsupervised, automatically starting
+    ///
+    /// * `name`: A name to give the actor. Useful for global referencing or debug printing
+    /// * `handler` The implementation of Self
+    ///
+    /// Returns a [Ok((ActorRef, JoinHandle<()>))] upon successful start, denoting the actor reference
+    /// along with the join handle which will complete when the actor terminates. Returns [Err(SpawnErr)] if
+    /// the actor failed to start
+    async fn spawn(
+        name: Option<ActorName>,
+        handler: Self,
+    ) -> Result<(ActorRef<Self>, JoinHandle<()>), SpawnErr> {
+        ActorRuntime::<Self::Msg, Self::State, Self>::spawn(name, handler).await
+    }
+
+    /// Spawn an actor of this type with a supervisor, automatically starting the actor
+    ///
+    /// * `name`: A name to give the actor. Useful for global referencing or debug printing
+    /// * `handler` The implementation of Self
+    /// * `supervisor`: The [ActorCell] which is to become the supervisor (parent) of this actor
+    ///
+    /// Returns a [Ok((ActorRef, JoinHandle<()>))] upon successful start, denoting the actor reference
+    /// along with the join handle which will complete when the actor terminates. Returns [Err(SpawnErr)] if
+    /// the actor failed to start
+    async fn spawn_linked(
+        name: Option<ActorName>,
+        handler: Self,
+        supervisor: ActorCell,
+    ) -> Result<(ActorRef<Self>, JoinHandle<()>), SpawnErr> {
+        ActorRuntime::<Self::Msg, Self::State, Self>::spawn_linked(name, handler, supervisor).await
+    }
 }
 
-/// [Actor] is a struct which represents the actor. This struct is consumed by the
+/// [ActorRuntime] is a struct which represents the actor. This struct is consumed by the
 /// `start` operation, but results in an [ActorRef] to communicate and operate with
-pub struct Actor<TMsg, TState, THandler>
+pub struct ActorRuntime<TMsg, TState, THandler>
 where
     TMsg: Message,
     TState: State,
-    THandler: ActorHandler<Msg = TMsg, State = TState>,
+    THandler: Actor<Msg = TMsg, State = TState>,
 {
     base: ActorRef<THandler>,
     handler: Arc<THandler>,
 }
 
-impl<TMsg, TState, THandler> Actor<TMsg, TState, THandler>
+impl<TMsg, TState, THandler> ActorRuntime<TMsg, TState, THandler>
 where
     TMsg: Message,
     TState: State,
-    THandler: ActorHandler<Msg = TMsg, State = TState>,
+    THandler: Actor<Msg = TMsg, State = TState>,
 {
     /// Spawn an actor, which is unsupervised, automatically starting the actor
     ///
     /// * `name`: A name to give the actor. Useful for global referencing or debug printing
-    /// * `handler` The [ActorHandler] defining the logic for this actor
+    /// * `handler` The [Actor] defining the logic for this actor
     ///
     /// Returns a [Ok((ActorRef, JoinHandle<()>))] upon successful start, denoting the actor reference
     /// along with the join handle which will complete when the actor terminates. Returns [Err(SpawnErr)] if
@@ -147,7 +182,7 @@ where
     /// Spawn an actor with a supervisor, automatically starting the actor
     ///
     /// * `name`: A name to give the actor. Useful for global referencing or debug printing
-    /// * `handler` The [ActorHandler] defining the logic for this actor
+    /// * `handler` The [Actor] defining the logic for this actor
     /// * `supervisor`: The [ActorCell] which is to become the supervisor (parent) of this actor
     ///
     /// Returns a [Ok((ActorRef, JoinHandle<()>))] upon successful start, denoting the actor reference
@@ -165,7 +200,7 @@ where
     /// Create a new actor with some handler implementation and initial state
     ///
     /// * `name`: A name to give the actor. Useful for global referencing or debug printing
-    /// * `handler` The [ActorHandler] defining the logic for this actor
+    /// * `handler` The [Actor] defining the logic for this actor
     ///
     /// Returns A tuple [(Actor, ActorPortSet)] to be passed to the `start` function of [Actor]
     fn new(name: Option<ActorName>, handler: THandler) -> Result<(Self, ActorPortSet), SpawnErr> {
@@ -311,11 +346,11 @@ where
     /// along with optionally whether we were signaled mid-processing or not
     ///
     /// * `myself` - The current [ActorRef]
-    /// * `state` - The current [ActorHandler::State] object
-    /// * `handler` - Pointer to the [ActorHandler] definition
+    /// * `state` - The current [Actor::State] object
+    /// * `handler` - Pointer to the [Actor] definition
     /// * `ports` - The mutable [ActorPortSet] which are the message ports for this actor
     ///
-    /// Returns a tuple of the next [ActorHandler::State] and a flag to denote if the processing
+    /// Returns a tuple of the next [Actor::State] and a flag to denote if the processing
     /// loop is done
     async fn process_message(
         myself: ActorRef<THandler>,
diff --git a/ractor/src/actor/supervision.rs b/ractor/src/actor/supervision.rs
index 539c1b1..e757a54 100644
--- a/ractor/src/actor/supervision.rs
+++ b/ractor/src/actor/supervision.rs
@@ -9,7 +9,7 @@
 //! Supervisors are responsible for the lifecycle of a child actor such that they get notified
 //! when a child actor starts, stops, or panics (when possible). The supervisor can then decide
 //! how to handle the event. Should it restart the actor, leave it dead, potentially die itself
-//! notifying the supervisor's supervisor? That's up to the implementation of the [super::ActorHandler]
+//! notifying the supervisor's supervisor? That's up to the implementation of the [super::Actor]
 //!
 //! This is currently an initial implementation of [Erlang supervisors](https://www.erlang.org/doc/man/supervisor.html)
 //! which will be expanded upon as the library develops. Next in line is likely supervision strategies
@@ -23,7 +23,7 @@ use std::sync::{
 use dashmap::DashMap;
 
 use super::{actor_cell::ActorCell, messages::SupervisionEvent};
-use crate::{ActorHandler, ActorId};
+use crate::{Actor, ActorId};
 
 /// A supervision tree
 #[derive(Default)]
@@ -107,7 +107,7 @@ impl SupervisionTree {
     /// Send a notification to all supervisors
     pub fn notify_supervisor<TActor>(&self, evt: SupervisionEvent)
     where
-        TActor: ActorHandler,
+        TActor: Actor,
     {
         if let Some(parent) = &*(self.supervisor.read().unwrap()) {
             let _ = parent.send_supervisor_evt(evt);
diff --git a/ractor/src/lib.rs b/ractor/src/lib.rs
index 6d074be..179e1ba 100644
--- a/ractor/src/lib.rs
+++ b/ractor/src/lib.rs
@@ -20,7 +20,7 @@
 //! An example "ping-pong" actor might be the following
 //!
 //! ```rust
-//! use ractor::{Actor, ActorRef, ActorHandler};
+//! use ractor::{Actor, ActorRef};
 //!
 //! /// [PingPong] is a basic actor that will print
 //! /// ping..pong.. repeatedly until some exit
@@ -54,7 +54,7 @@
 //!
 //! // the implementation of our actor's "logic"
 //! #[async_trait::async_trait]
-//! impl ActorHandler for PingPong {
+//! impl Actor for PingPong {
 //!     // An actor has a message type
 //!     type Msg = Message;
 //!     // and (optionally) internal state
@@ -111,7 +111,7 @@
 //!
 //! NOTE: panic's in `pre_start` of an actor will cause failures to spawn, rather than supervision notified failurs as the actor hasn't "linked"
 //! to its supervisor yet. However failures in `post_start`, `handle`, `handle_supervisor_evt`, `post_stop` will notify the supervisor should a failure
-//! occur. See [crate::ActorHandler] documentation for more information
+//! occur. See [crate::Actor] documentation for more information
 //!
 //! ## Messaging actors
 //!
@@ -164,9 +164,9 @@ use rand as _;
 pub use actor::actor_cell::{ActorCell, ActorRef, ActorStatus, ACTIVE_STATES};
 pub use actor::errors::{ActorErr, MessagingErr, SpawnErr};
 pub use actor::messages::{Signal, SupervisionEvent};
-pub use actor::{Actor, ActorHandler};
+pub use actor::{Actor, ActorRuntime};
 pub use actor_id::ActorId;
-pub use port::{InputPort, OutputMessage, OutputPort, RpcReplyPort};
+pub use port::{OutputMessage, OutputPort, RpcReplyPort};
 
 /// Message type for an actor. Generally an enum
 /// which muxes the various types of inner-messages the actor
diff --git a/ractor/src/port/mod.rs b/ractor/src/port/mod.rs
index 516ebf2..25091ff 100644
--- a/ractor/src/port/mod.rs
+++ b/ractor/src/port/mod.rs
@@ -23,7 +23,7 @@ pub(crate) type BoundedInputPort<TMsg> = mpsc::Sender<TMsg>;
 pub(crate) type BoundedInputPortReceiver<TMsg> = mpsc::Receiver<TMsg>;
 
 /// An unbounded message port (alias of [mpsc::UnboundedSender])
-pub type InputPort<TMsg> = mpsc::UnboundedSender<TMsg>;
+pub(crate) type InputPort<TMsg> = mpsc::UnboundedSender<TMsg>;
 /// An unbounded message port's receiver (alias of [mpsc::UnboundedReceiver])
 pub(crate) type InputPortReceiver<TMsg> = mpsc::UnboundedReceiver<TMsg>;
 
diff --git a/ractor/src/port/output/mod.rs b/ractor/src/port/output/mod.rs
index ffafc18..881a720 100644
--- a/ractor/src/port/output/mod.rs
+++ b/ractor/src/port/output/mod.rs
@@ -15,7 +15,7 @@ use std::sync::RwLock;
 use tokio::sync::broadcast as pubsub;
 use tokio::task::JoinHandle;
 
-use crate::{ActorHandler, ActorRef, Message};
+use crate::{Actor, ActorRef, Message};
 
 #[cfg(test)]
 mod tests;
@@ -69,7 +69,7 @@ where
     pub fn subscribe<TReceiver, F>(&self, receiver: ActorRef<TReceiver>, converter: F)
     where
         F: Fn(TMsg) -> Option<TReceiver::Msg> + Send + 'static,
-        TReceiver: ActorHandler,
+        TReceiver: Actor,
     {
         let mut subs = self.subscriptions.write().unwrap();
 
@@ -136,7 +136,7 @@ impl OutputPortSubscription {
     where
         TMsg: OutputMessage,
         F: Fn(TMsg) -> Option<TReceiver::Msg> + Send + 'static,
-        TReceiver: ActorHandler,
+        TReceiver: Actor,
     {
         let handle = tokio::spawn(async move {
             while let Ok(Some(msg)) = port.recv().await {
diff --git a/ractor/src/registry/mod.rs b/ractor/src/registry/mod.rs
index ebfa8eb..d4a3950 100644
--- a/ractor/src/registry/mod.rs
+++ b/ractor/src/registry/mod.rs
@@ -15,7 +15,7 @@
 //!
 //! You can then retrieve actors by name with [where_is]. Note: this
 //! function only returns the [ActorCell] reference to the actor, it
-//! additionally requires knowledge of the [crate::ActorHandler] in order
+//! additionally requires knowledge of the [crate::Actor] in order
 //! to send messages to it (since you need to know the message type)
 //! or agents will runtime panic on message reception, and supervision
 //! processes would need to restart the actors.
diff --git a/ractor/src/rpc/mod.rs b/ractor/src/rpc/mod.rs
index b25ae34..c6dcca4 100644
--- a/ractor/src/rpc/mod.rs
+++ b/ractor/src/rpc/mod.rs
@@ -15,7 +15,7 @@ use tokio::sync::oneshot;
 use tokio::task::JoinHandle;
 use tokio::time::{self, Duration};
 
-use crate::{ActorCell, ActorHandler, ActorRef, Message, MessagingErr, RpcReplyPort};
+use crate::{Actor, ActorCell, ActorRef, Message, MessagingErr, RpcReplyPort};
 
 pub mod call_result;
 pub use call_result::CallResult;
@@ -31,7 +31,7 @@ mod tests;
 /// Returns [Ok(())] upon successful send, [Err(MessagingErr)] otherwise
 pub fn cast<TActor>(actor: &ActorCell, msg: TActor::Msg) -> Result<(), MessagingErr>
 where
-    TActor: ActorHandler,
+    TActor: Actor,
 {
     actor.send_message::<TActor>(msg)
 }
@@ -52,7 +52,7 @@ pub async fn call<TActor, TReply, TMsgBuilder>(
     timeout_option: Option<Duration>,
 ) -> Result<CallResult<TReply>, MessagingErr>
 where
-    TActor: ActorHandler,
+    TActor: Actor,
     TMsgBuilder: FnOnce(RpcReplyPort<TReply>) -> TActor::Msg,
 {
     let (tx, rx) = oneshot::channel();
@@ -90,7 +90,7 @@ pub async fn multi_call<TActor, TReply, TMsgBuilder>(
     timeout_option: Option<Duration>,
 ) -> Result<Vec<CallResult<TReply>>, MessagingErr>
 where
-    TActor: ActorHandler,
+    TActor: Actor,
     TMsgBuilder: Fn(RpcReplyPort<TReply>) -> TActor::Msg,
 {
     let mut rx_ports = Vec::with_capacity(actors.len());
@@ -149,10 +149,10 @@ pub fn call_and_forward<TActor, TForwardActor, TReply, TMsgBuilder, FwdMapFn>(
     timeout_option: Option<Duration>,
 ) -> Result<JoinHandle<CallResult<Result<(), MessagingErr>>>, MessagingErr>
 where
-    TActor: ActorHandler,
+    TActor: Actor,
     TReply: Message,
     TMsgBuilder: FnOnce(RpcReplyPort<TReply>) -> TActor::Msg,
-    TForwardActor: ActorHandler,
+    TForwardActor: Actor,
     FwdMapFn: FnOnce(TReply) -> TForwardActor::Msg + Send + 'static,
 {
     let (tx, rx) = oneshot::channel();
@@ -178,12 +178,12 @@ where
 
 impl<TActor> ActorRef<TActor>
 where
-    TActor: ActorHandler,
+    TActor: Actor,
 {
     /// Alias of [cast]
     pub fn cast(&self, msg: TActor::Msg) -> Result<(), MessagingErr>
     where
-        TActor: ActorHandler,
+        TActor: Actor,
     {
         cast::<TActor>(&self.inner, msg)
     }
@@ -211,7 +211,7 @@ where
     where
         TReply: Message,
         TMsgBuilder: FnOnce(RpcReplyPort<TReply>) -> TActor::Msg,
-        TForwardActor: ActorHandler,
+        TForwardActor: Actor,
         TFwdMessageBuilder: FnOnce(TReply) -> TForwardActor::Msg + Send + 'static,
     {
         call_and_forward::<TActor, TForwardActor, TReply, TMsgBuilder, TFwdMessageBuilder>(
diff --git a/ractor/src/time/mod.rs b/ractor/src/time/mod.rs
index 834f79e..e0d2abc 100644
--- a/ractor/src/time/mod.rs
+++ b/ractor/src/time/mod.rs
@@ -16,7 +16,7 @@
 
 use tokio::{task::JoinHandle, time::Duration};
 
-use crate::{ActorCell, ActorHandler, MessagingErr, ACTIVE_STATES};
+use crate::{Actor, ActorCell, MessagingErr, ACTIVE_STATES};
 
 #[cfg(test)]
 mod tests;
@@ -29,13 +29,13 @@ mod tests;
 /// * `period` - The [Duration] representing the period for the send interval
 /// * `actor` - The [ActorCell] representing the [crate::Actor] to communicate with
 /// * `msg` - The [Fn] message builder which is called to generate a message for each send
-/// operation
+/// operation.
 ///
 /// Returns: The [JoinHandle] which represents the backgrounded work (can be ignored to
 /// "fire and forget")
 pub fn send_interval<TActor, F>(period: Duration, actor: ActorCell, msg: F) -> JoinHandle<()>
 where
-    TActor: ActorHandler,
+    TActor: Actor,
     F: Fn() -> TActor::Msg + Send + 'static,
 {
     tokio::spawn(async move {
@@ -67,7 +67,7 @@ pub fn send_after<TActor>(
     msg: TActor::Msg,
 ) -> JoinHandle<Result<(), MessagingErr>>
 where
-    TActor: ActorHandler,
+    TActor: Actor,
 {
     tokio::spawn(async move {
         tokio::time::sleep(period).await;
@@ -107,12 +107,12 @@ pub fn kill_after(period: Duration, actor: ActorCell) -> JoinHandle<()> {
 /// Add the timing functionality on top of the [crate::ActorRef]
 impl<TActor> crate::ActorRef<TActor>
 where
-    TActor: ActorHandler,
+    TActor: Actor,
 {
     /// Alias of [send_interval]
     pub fn send_interval<F>(&self, period: Duration, msg: F) -> JoinHandle<()>
     where
-        TActor: ActorHandler,
+        TActor: Actor,
         F: Fn() -> TActor::Msg + Send + 'static,
     {
         send_interval::<TActor, F>(period, self.get_cell(), msg)


Test patch:
diff --git a/ractor/src/actor/tests/mod.rs b/ractor/src/actor/tests/mod.rs
index 217112d..e1c3cfc 100644
--- a/ractor/src/actor/tests/mod.rs
+++ b/ractor/src/actor/tests/mod.rs
@@ -12,7 +12,7 @@ use std::sync::{
 
 use tokio::time::Duration;
 
-use crate::{Actor, ActorCell, ActorHandler, ActorRef, ActorStatus, SpawnErr, SupervisionEvent};
+use crate::{Actor, ActorCell, ActorRef, ActorStatus, SpawnErr, SupervisionEvent};
 
 mod supervisor;
 
@@ -21,7 +21,7 @@ async fn test_panic_on_start_captured() {
     struct TestActor;
 
     #[async_trait::async_trait]
-    impl ActorHandler for TestActor {
+    impl Actor for TestActor {
         type Msg = ();
 
         type State = ();
@@ -44,7 +44,7 @@ async fn test_stop_higher_priority_over_messages() {
     }
 
     #[async_trait::async_trait]
-    impl ActorHandler for TestActor {
+    impl Actor for TestActor {
         type Msg = ();
 
         type State = ();
@@ -107,7 +107,7 @@ async fn test_kill_terminates_work() {
     struct TestActor;
 
     #[async_trait::async_trait]
-    impl ActorHandler for TestActor {
+    impl Actor for TestActor {
         type Msg = ();
 
         type State = ();
@@ -145,7 +145,7 @@ async fn test_stop_does_not_terminate_async_work() {
     struct TestActor;
 
     #[async_trait::async_trait]
-    impl ActorHandler for TestActor {
+    impl Actor for TestActor {
         type Msg = ();
 
         type State = ();
@@ -190,7 +190,7 @@ async fn test_kill_terminates_supervision_work() {
     struct TestActor;
 
     #[async_trait::async_trait]
-    impl ActorHandler for TestActor {
+    impl Actor for TestActor {
         type Msg = ();
 
         type State = ();
@@ -224,3 +224,46 @@ async fn test_kill_terminates_supervision_work() {
     assert_eq!(ActorStatus::Stopped, actor.get_status());
     assert!(handle.is_finished());
 }
+
+#[tokio::test]
+async fn test_sending_message_to_invalid_actor_type() {
+    struct TestActor1;
+    struct TestMessage1;
+    #[async_trait::async_trait]
+    impl Actor for TestActor1 {
+        type Msg = TestMessage1;
+        type State = ();
+        async fn pre_start(&self, _myself: ActorRef<Self>) -> Self::State {
+            ()
+        }
+    }
+    struct TestActor2;
+    struct TestMessage2;
+    #[async_trait::async_trait]
+    impl Actor for TestActor2 {
+        type Msg = TestMessage2;
+        type State = ();
+        async fn pre_start(&self, _myself: ActorRef<Self>) -> Self::State {
+            ()
+        }
+    }
+
+    let (actor1, handle1) = Actor::spawn(None, TestActor1)
+        .await
+        .expect("Failed to start test actor 1");
+    let (actor2, handle2) = Actor::spawn(None, TestActor2)
+        .await
+        .expect("Failed to start test actor 2");
+
+    // check that actor 2 can't receive a message for actor 1 type
+    assert!(actor2
+        .get_cell()
+        .send_message::<TestActor1>(TestMessage1)
+        .is_err());
+
+    actor1.stop(None);
+    actor2.stop(None);
+
+    handle1.await.unwrap();
+    handle2.await.unwrap();
+}
diff --git a/ractor/src/actor/tests/supervisor.rs b/ractor/src/actor/tests/supervisor.rs
index bcad227..2f7487c 100644
--- a/ractor/src/actor/tests/supervisor.rs
+++ b/ractor/src/actor/tests/supervisor.rs
@@ -12,7 +12,7 @@ use std::sync::{
 
 use tokio::time::Duration;
 
-use crate::{Actor, ActorCell, ActorHandler, ActorRef, ActorStatus, SupervisionEvent};
+use crate::{Actor, ActorCell, ActorRef, ActorStatus, SupervisionEvent};
 
 #[tokio::test]
 async fn test_supervision_panic_in_post_startup() {
@@ -22,7 +22,7 @@ async fn test_supervision_panic_in_post_startup() {
     }
 
     #[async_trait::async_trait]
-    impl ActorHandler for Child {
+    impl Actor for Child {
         type Msg = ();
         type State = ();
         async fn pre_start(&self, _this_actor: ActorRef<Self>) -> Self::State {}
@@ -32,7 +32,7 @@ async fn test_supervision_panic_in_post_startup() {
     }
 
     #[async_trait::async_trait]
-    impl ActorHandler for Supervisor {
+    impl Actor for Supervisor {
         type Msg = ();
         type State = ();
         async fn pre_start(&self, _this_actor: ActorRef<Self>) -> Self::State {}
@@ -89,7 +89,7 @@ async fn test_supervision_panic_in_handle() {
     }
 
     #[async_trait::async_trait]
-    impl ActorHandler for Child {
+    impl Actor for Child {
         type Msg = ();
         type State = ();
         async fn pre_start(&self, _this_actor: ActorRef<Self>) -> Self::State {}
@@ -104,7 +104,7 @@ async fn test_supervision_panic_in_handle() {
     }
 
     #[async_trait::async_trait]
-    impl ActorHandler for Supervisor {
+    impl Actor for Supervisor {
         type Msg = ();
         type State = ();
         async fn pre_start(&self, _this_actor: ActorRef<Self>) -> Self::State {}
@@ -169,7 +169,7 @@ async fn test_supervision_panic_in_post_stop() {
     }
 
     #[async_trait::async_trait]
-    impl ActorHandler for Child {
+    impl Actor for Child {
         type Msg = ();
         type State = ();
         async fn pre_start(&self, myself: ActorRef<Self>) -> Self::State {
@@ -182,7 +182,7 @@ async fn test_supervision_panic_in_post_stop() {
     }
 
     #[async_trait::async_trait]
-    impl ActorHandler for Supervisor {
+    impl Actor for Supervisor {
         type Msg = ();
         type State = ();
         async fn pre_start(&self, _this_actor: ActorRef<Self>) -> Self::State {}
@@ -233,7 +233,7 @@ async fn test_supervision_panic_in_supervisor_handle() {
     }
 
     #[async_trait::async_trait]
-    impl ActorHandler for Child {
+    impl Actor for Child {
         type Msg = ();
         type State = ();
         async fn pre_start(&self, _this_actor: ActorRef<Self>) -> Self::State {}
@@ -248,7 +248,7 @@ async fn test_supervision_panic_in_supervisor_handle() {
     }
 
     #[async_trait::async_trait]
-    impl ActorHandler for Midpoint {
+    impl Actor for Midpoint {
         type Msg = ();
         type State = ();
         async fn pre_start(&self, _this_actor: ActorRef<Self>) -> Self::State {}
@@ -265,7 +265,7 @@ async fn test_supervision_panic_in_supervisor_handle() {
     }
 
     #[async_trait::async_trait]
-    impl ActorHandler for Supervisor {
+    impl Actor for Supervisor {
         type Msg = ();
         type State = ();
         async fn pre_start(&self, _this_actor: ActorRef<Self>) -> Self::State {}
@@ -345,14 +345,14 @@ async fn test_killing_a_supervisor_terminates_children() {
     struct Supervisor;
 
     #[async_trait::async_trait]
-    impl ActorHandler for Child {
+    impl Actor for Child {
         type Msg = ();
         type State = ();
         async fn pre_start(&self, _this_actor: ActorRef<Self>) -> Self::State {}
     }
 
     #[async_trait::async_trait]
-    impl ActorHandler for Supervisor {
+    impl Actor for Supervisor {
         type Msg = ();
         type State = ();
         async fn pre_start(&self, _this_actor: ActorRef<Self>) -> Self::State {}
diff --git a/ractor/src/pg/tests.rs b/ractor/src/pg/tests.rs
index 1b2d8d5..1b9bb2d 100644
--- a/ractor/src/pg/tests.rs
+++ b/ractor/src/pg/tests.rs
@@ -9,14 +9,14 @@ use std::sync::Arc;
 use ::function_name::named;
 use tokio::time::Duration;
 
-use crate::{Actor, ActorHandler, GroupName, SupervisionEvent};
+use crate::{Actor, GroupName, SupervisionEvent};
 
 use crate::pg;
 
 struct TestActor;
 
 #[async_trait::async_trait]
-impl ActorHandler for TestActor {
+impl Actor for TestActor {
     type Msg = ();
 
     type State = ();
@@ -195,7 +195,7 @@ async fn test_pg_monitoring() {
     }
 
     #[async_trait::async_trait]
-    impl ActorHandler for AutoJoinActor {
+    impl Actor for AutoJoinActor {
         type Msg = ();
 
         type State = ();
@@ -211,7 +211,7 @@ async fn test_pg_monitoring() {
     }
 
     #[async_trait::async_trait]
-    impl ActorHandler for NotificationMonitor {
+    impl Actor for NotificationMonitor {
         type Msg = ();
 
         type State = ();
diff --git a/ractor/src/port/output/tests.rs b/ractor/src/port/output/tests.rs
index f2ffd7d..3382285 100644
--- a/ractor/src/port/output/tests.rs
+++ b/ractor/src/port/output/tests.rs
@@ -10,7 +10,7 @@ use std::time::Duration;
 use futures::future::join_all;
 use tokio::time::timeout;
 
-use crate::{Actor, ActorHandler, ActorRef};
+use crate::{Actor, ActorRef};
 
 use super::*;
 
@@ -21,7 +21,7 @@ async fn test_single_forward() {
         Stop,
     }
     #[async_trait::async_trait]
-    impl ActorHandler for TestActor {
+    impl Actor for TestActor {
         type Msg = TestActorMessage;
 
         type State = u8;
@@ -77,7 +77,7 @@ async fn test_50_receivers() {
         Stop,
     }
     #[async_trait::async_trait]
-    impl ActorHandler for TestActor {
+    impl Actor for TestActor {
         type Msg = TestActorMessage;
 
         type State = u8;
diff --git a/ractor/src/registry/tests.rs b/ractor/src/registry/tests.rs
index 4c03600..2d2cfe0 100644
--- a/ractor/src/registry/tests.rs
+++ b/ractor/src/registry/tests.rs
@@ -7,14 +7,14 @@
 
 use tokio::time::Duration;
 
-use crate::{Actor, ActorHandler, SpawnErr};
+use crate::{Actor, SpawnErr};
 
 #[tokio::test]
 async fn test_basic_registation() {
     struct EmptyActor;
 
     #[async_trait::async_trait]
-    impl ActorHandler for EmptyActor {
+    impl Actor for EmptyActor {
         type Msg = ();
 
         type State = ();
@@ -37,7 +37,7 @@ async fn test_duplicate_registration() {
     struct EmptyActor;
 
     #[async_trait::async_trait]
-    impl ActorHandler for EmptyActor {
+    impl Actor for EmptyActor {
         type Msg = ();
 
         type State = ();
@@ -70,7 +70,7 @@ async fn test_actor_registry_unenrollment() {
     struct EmptyActor;
 
     #[async_trait::async_trait]
-    impl ActorHandler for EmptyActor {
+    impl Actor for EmptyActor {
         type Msg = ();
 
         type State = ();
diff --git a/ractor/src/rpc/tests.rs b/ractor/src/rpc/tests.rs
index 999b1b2..7c8d47c 100644
--- a/ractor/src/rpc/tests.rs
+++ b/ractor/src/rpc/tests.rs
@@ -11,7 +11,7 @@ use std::sync::Arc;
 use tokio::time::Duration;
 
 use crate::rpc;
-use crate::{Actor, ActorHandler, ActorRef};
+use crate::{Actor, ActorRef};
 
 #[tokio::test]
 async fn test_rpc_cast() {
@@ -22,7 +22,7 @@ async fn test_rpc_cast() {
     }
 
     #[async_trait::async_trait]
-    impl ActorHandler for TestActor {
+    impl Actor for TestActor {
         type Msg = ();
 
         type State = ();
@@ -71,7 +71,7 @@ async fn test_rpc_call() {
     }
 
     #[async_trait::async_trait]
-    impl ActorHandler for TestActor {
+    impl Actor for TestActor {
         type Msg = MessageFormat;
 
         type State = ();
@@ -128,7 +128,7 @@ async fn test_rpc_call_forwarding() {
     }
 
     #[async_trait::async_trait]
-    impl ActorHandler for Worker {
+    impl Actor for Worker {
         type Msg = WorkerMessage;
 
         type State = ();
@@ -163,7 +163,7 @@ async fn test_rpc_call_forwarding() {
     }
 
     #[async_trait::async_trait]
-    impl ActorHandler for Forwarder {
+    impl Actor for Forwarder {
         type Msg = ForwarderMessage;
 
         type State = ();
diff --git a/ractor/src/time/tests.rs b/ractor/src/time/tests.rs
index 3dcd784..29f26ae 100644
--- a/ractor/src/time/tests.rs
+++ b/ractor/src/time/tests.rs
@@ -12,7 +12,7 @@ use std::sync::{
 
 use tokio::time::Duration;
 
-use crate::{Actor, ActorHandler, ActorRef};
+use crate::{Actor, ActorRef};
 
 #[tokio::test]
 async fn test_intervals() {
@@ -23,7 +23,7 @@ async fn test_intervals() {
     }
 
     #[async_trait::async_trait]
-    impl ActorHandler for TestActor {
+    impl Actor for TestActor {
         type Msg = ();
         type State = Arc<AtomicU8>;
         async fn pre_start(&self, _this_actor: ActorRef<Self>) -> Self::State {
@@ -49,11 +49,7 @@ async fn test_intervals() {
     .await
     .expect("Failed to create test actor");
 
-    let interval_handle = crate::time::send_interval::<TestActor, _>(
-        Duration::from_millis(10),
-        actor_ref.clone().into(),
-        || (),
-    );
+    let interval_handle = actor_ref.send_interval(Duration::from_millis(10), || ());
 
     // even though the timer is started, we should be in a "pause" state for 10ms,
     // therefore the counter should be empty
@@ -82,7 +78,7 @@ async fn test_send_after() {
     }
 
     #[async_trait::async_trait]
-    impl ActorHandler for TestActor {
+    impl Actor for TestActor {
         type Msg = ();
         type State = Arc<AtomicU8>;
         async fn pre_start(&self, _this_actor: ActorRef<Self>) -> Self::State {
@@ -108,11 +104,7 @@ async fn test_send_after() {
     .await
     .expect("Failed to create test actor");
 
-    let send_after_handle = crate::time::send_after::<TestActor>(
-        Duration::from_millis(10),
-        actor_ref.clone().into(),
-        (),
-    );
+    let send_after_handle = actor_ref.send_after(Duration::from_millis(10), ());
 
     // even though the timer is started, we should be in a "pause" state for 10ms,
     // therefore the counter should be empty
@@ -137,7 +129,7 @@ async fn test_exit_after() {
     struct TestActor;
 
     #[async_trait::async_trait]
-    impl ActorHandler for TestActor {
+    impl Actor for TestActor {
         type Msg = ();
         type State = ();
         async fn pre_start(&self, _this_actor: ActorRef<Self>) -> Self::State {}
@@ -147,7 +139,7 @@ async fn test_exit_after() {
         .await
         .expect("Failed to create test actor");
 
-    let exit_handle = crate::time::exit_after(Duration::from_millis(10), actor_ref.into());
+    let exit_handle = actor_ref.exit_after(Duration::from_millis(10));
 
     tokio::time::sleep(Duration::from_millis(20)).await;
     // make sure the actor is dead + the interval handle doesn't send again
@@ -160,7 +152,7 @@ async fn test_kill_after() {
     struct TestActor;
 
     #[async_trait::async_trait]
-    impl ActorHandler for TestActor {
+    impl Actor for TestActor {
         type Msg = ();
         type State = ();
         async fn pre_start(&self, _this_actor: ActorRef<Self>) -> Self::State {}
@@ -185,7 +177,7 @@ async fn test_kill_after() {
     tokio::time::sleep(Duration::from_millis(10)).await;
 
     // kill the actor
-    let kill_handle = crate::time::kill_after(Duration::from_millis(10), actor_ref.into());
+    let kill_handle = actor_ref.kill_after(Duration::from_millis(10));
 
     tokio::time::sleep(Duration::from_millis(20)).await;
     // make sure the actor is dead + the interval handle doesn't send again