Closed grunch closed 2 years ago
First of all being new to Rust and using tonic
and related crates can be a bit more challenging than other things but I guess doable.
You don't need to add tonic
as a dependency, just call .into_inner()
on the returned Ok
variant. I suggest you take a look at the whole linked loptos
project to understand how to use it better. It even uses streaming APIs so you can see how those are used too. If you still don't understand something feel free to ask and if you see ways to improve the documentation I'd be happy to merge PRs.
The whole code is auto-generated and I don't want to modify it in ways that are not purely adding helpers or overriding things using official tonic
APIs. However I would like to eventually create a new library that provides higher-level bindings.
Thank you very much, this response and the loptos
code helped me a lot.
About about adding higher-level bindings yes I think those are needed, for example I think get_info
shouldn't ask for params and use internally GetInfoRequest
.
closing this issue and thank you again
get_info
shouldn't ask for params
Exactly this.
Hi, I am relative new to rust, as I am coding I am getting more doubts, today I was trying this library and I have few questions, I have this function
My first doubt is, get_info() method returns
Result<Response<GetInfoResponse>, Status>
but Response come fromtonic
which is atonic_lnd
dependency, so it's needed to addtonic
as a dependency to this project only to get theResponse
type, right? it shouldn't be better to wrap this type ontonic_lnd
?Other way to see it could be that
get_info
returnResult<tonic_lnd::rpc::GetInfoResponse, tonic_lnd::Error>
, at this moment I see it like a better solution.This makes sense?