Skip to content

Commit a4e8f37

Browse files
committed
update docs
1 parent 6bafb59 commit a4e8f37

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

capnp-rpc/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ To create an RPC-enabled object, you must implement that trait.
8383
struct MyBar {}
8484

8585
impl ::foo_capnp::bar::Server for MyBar {
86-
async fn baz(&self,
86+
async fn baz(
87+
self: Rc<Self>,
8788
params: ::foo_capnp::bar::BazParams,
8889
mut results: ::foo_capnp::bar::BazResults)
8990
-> Result<(), ::capnp::Error>
@@ -123,7 +124,8 @@ Here's an example of a method implementation that does not return immediately:
123124
struct MyQux {}
124125

125126
impl ::foo_capnp::qux::Server for MyQux {
126-
async fn quux(&mut self,
127+
async fn quux(
128+
self: Rc<Self>,
127129
params: ::foo_capnp::qux::QuuxParams,
128130
mut results: ::foo_capnp::wux::QuuxResults)
129131
-> Result<(), ::capnp::Error>

capnp-rpc/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@
3434
//! // Rust server defining an implementation of Foo.
3535
//! struct FooImpl;
3636
//! impl foo::Server for FooImpl {
37-
//! async fn identity(&self,
37+
//! async fn identity(
38+
//! self: Rc<Self>,
3839
//! params: foo::IdentityParams,
3940
//! mut results: foo::IdentityResults
4041
//! ) -> Result<(), ::capnp::Error> {

0 commit comments

Comments
 (0)