Hi,
I have been struggling with an issue for a couple of hours now and I can't find any solution,
so now I'm reaching out to you for help. And yes, I am a beginner in Rust, so please have that in mind.
I'm trying to call for the function poll_next() on a ClientSStreamReceiver, and according to the documentation
https://docs.rs/grpcio/0.6.0/grpcio/struct.ClientSStreamReceiver.html it should be a method with that name. And if I click into the ClientSStreamReceiver, the method is implemented as well, as I understand it.
impl<Resp> Stream for ClientSStreamReceiver<Resp> {
type Item = Result<Resp>;
#[inline]
fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context) -> Poll<Option<Self::Item>> {
Pin::new(&mut self.imp).poll(cx)
}
}
Maybe I use the function wrong in my application, it seems like the function wants a context-parameter, but I don't know how to pass it in.
let sub_info = client.subscribe_to_signals(&subscriber_config).unwrap();
match sub_info.pull_next() {}
And here is my error code is:
46 | match sub_info.poll_next() {}
| ^^^^^^^^^ method not found in `protos::grpcio::ClientSStreamReceiver<protos::network_api::Signals>`
My code is on GitHub as well, if you want to take a closer look: https://github.com/niclaslind/signalbroker-record-replay
Thanks in advance
// Niclas