Skip to content

Commit 9f09094

Browse files
committed
docs: update ZMessage references after blanket impl refactor
Remove misleading 'implement ZMessage' language from actions.md and protobuf_demo — users no longer write impl ZMessage, it's automatic.
1 parent 17c7a7e commit 9f09094

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

book/src/chapters/actions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ impl ZAction for CountAction {
336336

337337
**Key points:**
338338

339-
- `Goal`, `Feedback`, and `Result` can be any struct that implements `Serialize + Deserialize + Clone + Send + Sync + 'static` (blanket implementation via `ZMessage`)
339+
- `Goal`, `Feedback`, and `Result` can be any struct that is `Send + Sync + 'static` — the `ZMessage` trait is satisfied automatically via a blanket impl, no manual `impl ZMessage` needed
340340
- `name()` sets the Zenoh key prefix for the action's internal services and topics
341341
- The default `send_goal_type_info()`, `get_result_type_info()`, etc. all return `TypeHash::zero()`, which is correct for ros-z-to-ros-z communication. For ROS 2 interop, override these with the correct RIHS01 hashes.
342342

crates/ros-z/examples/protobuf_demo/src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,9 @@ pub fn run_service_client(
140140
println!("Successfully demonstrated protobuf service calls!");
141141
println!("\nKey points:");
142142
println!("1. Request/Response: Protobuf messages generated from .proto files");
143-
println!("2. Both implement MessageTypeInfo, WithTypeInfo, and ZMessage traits");
143+
println!(
144+
"2. Both implement MessageTypeInfo and WithTypeInfo (ZMessage is automatic via blanket impl)"
145+
);
144146
println!("3. Service type implements ZService and ServiceTypeInfo");
145147
println!("4. Works seamlessly with node.create_service() and node.create_client()");
146148
println!("5. Uses ProtobufSerdes for pure protobuf serialization (not CDR!)");

0 commit comments

Comments
 (0)