What's the return type of bind(..).serve(...)
?
#541
-
Hi, I am new to Rust, sorry for this beginner question. I am trying to find out what is the return type of the Here is what I am trying to achieve: I am trying to find the return type of the
Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
From looking at the docs we see that |
Beta Was this translation helpful? Give feedback.
-
Is it idiomatic to return the Server in this case? ( i need to run it later in |
Beta Was this translation helpful? Give feedback.
From looking at the docs we see that
serve
returns aServer
which implementsFuture
where theOutput
ishyper::Result<()>
. So if you add a.await
inside your function the return type becomesResult<(), hyper::Error>
.