Commit 2635863 1 parent db1fc42 commit 2635863 Copy full SHA for 2635863
File tree 2 files changed +7
-5
lines changed
2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -66,15 +66,16 @@ pub use spawn::*;
66
66
///
67
67
/// ```
68
68
/// use kameo::actor::{Actor, ActorRef, WeakActorRef};
69
- /// use kameo::error::{ActorStopReason, BoxError };
69
+ /// use kameo::error::{ActorStopReason, Infallible };
70
70
/// use kameo::mailbox::unbounded::UnboundedMailbox;
71
71
///
72
72
/// struct MyActor;
73
73
///
74
74
/// impl Actor for MyActor {
75
75
/// type Mailbox = UnboundedMailbox<Self>;
76
+ /// type Error = Infallible;
76
77
///
77
- /// async fn on_start(&mut self, actor_ref: ActorRef<Self>) -> Result<(), BoxError > {
78
+ /// async fn on_start(&mut self, actor_ref: ActorRef<Self>) -> Result<(), Infallible > {
78
79
/// println!("actor started");
79
80
/// Ok(())
80
81
/// }
@@ -83,7 +84,7 @@ pub use spawn::*;
83
84
/// &mut self,
84
85
/// actor_ref: WeakActorRef<Self>,
85
86
/// reason: ActorStopReason,
86
- /// ) -> Result<(), BoxError > {
87
+ /// ) -> Result<(), Infallible > {
87
88
/// println!("actor stopped");
88
89
/// Ok(())
89
90
/// }
Original file line number Diff line number Diff line change @@ -177,16 +177,17 @@ where
177
177
/// use std::time::Duration;
178
178
///
179
179
/// use kameo::actor::{Actor, ActorRef};
180
- /// use kameo::error::BoxError ;
180
+ /// use kameo::error::Infallible ;
181
181
/// use kameo::mailbox::unbounded::UnboundedMailbox;
182
182
/// use tokio::time::sleep;
183
183
///
184
184
/// struct MyActor;
185
185
///
186
186
/// impl Actor for MyActor {
187
187
/// type Mailbox = UnboundedMailbox<Self>;
188
+ /// type Error = Infallible;
188
189
///
189
- /// async fn on_start(&mut self, actor_ref: ActorRef<Self>) -> Result<(), BoxError > {
190
+ /// async fn on_start(&mut self, actor_ref: ActorRef<Self>) -> Result<(), Infallible > {
190
191
/// sleep(Duration::from_secs(2)).await; // Some io operation
191
192
/// Ok(())
192
193
/// }
You can’t perform that action at this time.
0 commit comments