rust-async-std Questions
1
Solved
I have some async function
async fn get_player(name: String, i: Instant) -> Option<Player> {
// some code here that returns a player structs
}
in my main function i want to run the above ...
Along asked 20/7, 2022 at 16:25
1
Solved
I think my question relates to Rust Issue 57017.
The following code does not compile and produces error: future cannot be sent between threads safely due to future created by async block is not 'Se...
Guess asked 30/9, 2021 at 11:54
1
Solved
I have the following code
use std::future::Future;
fn main() {
handle(Test::my_func);
}
fn handle<Fut>(fun: for<'r> fn(&'r mut Test) -> Fut) -> bool
where
Fut: Future<Ou...
Plaza asked 9/8, 2021 at 6:36
3
Solved
I have a simple TCP echo server using standard library:
use std::net::TcpListener;
fn main() {
let listener = TcpListener::bind("localhost:4321").unwrap();
loop {
let (conn, _addr) = ...
Belovo asked 4/8, 2020 at 8:54
1
© 2022 - 2024 — McMap. All rights reserved.