eclipse-uprotocol / up-rust

uProtocol Language Specific Library for Rust
Apache License 2.0
11 stars 9 forks source link

Do we still need method in invoke_method? #117

Closed evshary closed 2 months ago

evshary commented 4 months ago

Now the prototype of invoke_method is async fn invoke_method(&self, method: UUri, request: UMessage) -> RpcClientResult; https://github.com/eclipse-uprotocol/up-rust/blob/01e3149aa7ebffeb81f03746791693f198076c5e/src/rpc/rpcclient.rs#L43 Since UMessage contains the information of source and sink, I'm wondering whether we still need method: UUri here. I found that all I need is UMessage while implementing up-client-zenoh-rust.

sophokles73 commented 4 months ago

Yes, I agree that the method parameter is no longer needed/useful. I am currently working on a PR to add the Level 2 API to up-rust. As part of that, I will adapt the function's signature accordingly.

sophokles73 commented 3 months ago

this will be changed as part of #122

sophokles73 commented 2 months ago

As it turns out, the RpcClient's invoke_method function now accepts the method, call options and payload as separate parameters again. Closed via 7148f78407e9c265d45307b81ca75b515d247dad