Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- error[E0277]: `dyn iml_request_retry::RetryPolicy<reqwest::error::Error>` cannot be sent between threads safely
- --> iml-request-retry/examples/demo-server-client.rs:43:14
- |
- 43 | executor.spawn(async move {
- | ^^^^^ `dyn iml_request_retry::RetryPolicy<reqwest::error::Error>` cannot be sent between threads safely
- |
- = help: the trait `std::marker::Send` is not implemented for `dyn iml_request_retry::RetryPolicy<reqwest::error::Error>`
- = note: required because of the requirements on the impl of `std::marker::Send` for `&mut dyn iml_request_retry::RetryPolicy<reqwest::error::Error>`
- = note: required because it appears within the type `for<'r, 's, 't0, 't1, 't2, 't3, 't4, 't5, 't6, 't7, 't8, 't9, 't10, 't11, 't12, 't13, 't14, 't15, 't16, 't17, 't18, 't19, 't20, 't21, 't22> {&'r std::net::SocketAddr, u32, [closure@iml-request-retry/examples/demo-server-client.rs:71:24: 75:6], for<'_> fn([closure@iml-request-retry/examples/demo-server-client.rs:77:18: 77:47 addr:&'t1 &'t2 std::net::SocketAddr, client_id:&'t3 u32], &mut dyn iml_request_retry::RetryPolicy<reqwest::error::Error>) -> impl core::future::future::Future {iml_request_retry::retry_future::<std::string::String, reqwest::error::Error, impl core::future::future::Future, [closure@iml-request-retry/examples/demo-server-client.rs:77:18: 77:47 addr:&'t1 &'t2 std::net::SocketAddr, client_id:&'t3 u32]>}, [closure@iml-request-retry/examples/demo-server-client.rs:77:18: 77:47 addr:&'t5 &'t6 std::net::SocketAddr, client_id:&'t7 u32], [closure@iml-request-retry/examples/demo-server-client.rs:71:24: 75:6], &'t8 mut (dyn iml_request_retry::RetryPolicy<reqwest::error::Error> + 't9), &'t10 mut [closure@iml-request-retry/examples/demo-server-client.rs:71:24: 75:6], impl core::future::future::Future, impl core::future::future::Future, ()}`
- = note: required because it appears within the type `[static generator@iml-request-retry/examples/demo-server-client.rs:70:96: 78:2 addr:&std::net::SocketAddr, client_id:u32 for<'r, 's, 't0, 't1, 't2, 't3, 't4, 't5, 't6, 't7, 't8, 't9, 't10, 't11, 't12, 't13, 't14, 't15, 't16, 't17, 't18, 't19, 't20, 't21, 't22> {&'r std::net::SocketAddr, u32, [closure@iml-request-retry/examples/demo-server-client.rs:71:24: 75:6], for<'_> fn([closure@iml-request-retry/examples/demo-server-client.rs:77:18: 77:47 addr:&'t1 &'t2 std::net::SocketAddr, client_id:&'t3 u32], &mut dyn iml_request_retry::RetryPolicy<reqwest::error::Error>) -> impl core::future::future::Future {iml_request_retry::retry_future::<std::string::String, reqwest::error::Error, impl core::future::future::Future, [closure@iml-request-retry/examples/demo-server-client.rs:77:18: 77:47 addr:&'t1 &'t2 std::net::SocketAddr, client_id:&'t3 u32]>}, [closure@iml-request-retry/examples/demo-server-client.rs:77:18: 77:47 addr:&'t5 &'t6 std::net::SocketAddr, client_id:&'t7 u32], [closure@iml-request-retry/examples/demo-server-client.rs:71:24: 75:6], &'t8 mut (dyn iml_request_retry::RetryPolicy<reqwest::error::Error> + 't9), &'t10 mut [closure@iml-request-retry/examples/demo-server-client.rs:71:24: 75:6], impl core::future::future::Future, impl core::future::future::Future, ()}]`
- = note: required because it appears within the type `std::future::GenFuture<[static generator@iml-request-retry/examples/demo-server-client.rs:70:96: 78:2 addr:&std::net::SocketAddr, client_id:u32 for<'r, 's, 't0, 't1, 't2, 't3, 't4, 't5, 't6, 't7, 't8, 't9, 't10, 't11, 't12, 't13, 't14, 't15, 't16, 't17, 't18, 't19, 't20, 't21, 't22> {&'r std::net::SocketAddr, u32, [closure@iml-request-retry/examples/demo-server-client.rs:71:24: 75:6], for<'_> fn([closure@iml-request-retry/examples/demo-server-client.rs:77:18: 77:47 addr:&'t1 &'t2 std::net::SocketAddr, client_id:&'t3 u32], &mut dyn iml_request_retry::RetryPolicy<reqwest::error::Error>) -> impl core::future::future::Future {iml_request_retry::retry_future::<std::string::String, reqwest::error::Error, impl core::future::future::Future, [closure@iml-request-retry/examples/demo-server-client.rs:77:18: 77:47 addr:&'t1 &'t2 std::net::SocketAddr, client_id:&'t3 u32]>}, [closure@iml-request-retry/examples/demo-server-client.rs:77:18: 77:47 addr:&'t5 &'t6 std::net::SocketAddr, client_id:&'t7 u32], [closure@iml-request-retry/examples/demo-server-client.rs:71:24: 75:6], &'t8 mut (dyn iml_request_retry::RetryPolicy<reqwest::error::Error> + 't9), &'t10 mut [closure@iml-request-retry/examples/demo-server-client.rs:71:24: 75:6], impl core::future::future::Future, impl core::future::future::Future, ()}]>`
- = note: required because it appears within the type `impl core::future::future::Future`
- = note: required because it appears within the type `impl core::future::future::Future`
- = note: required because it appears within the type `for<'r, 's, 't0, 't1> {for<'_> fn(&std::net::SocketAddr, u32) -> impl core::future::future::Future {retry_client_obj}, std::net::SocketAddr, &'r std::net::SocketAddr, &'s std::net::SocketAddr, u32, impl core::future::future::Future, impl core::future::future::Future, ()}`
- = note: required because it appears within the type `[static generator@iml-request-retry/examples/demo-server-client.rs:43:31: 45:6 addr:std::net::SocketAddr for<'r, 's, 't0, 't1> {for<'_> fn(&std::net::SocketAddr, u32) -> impl core::future::future::Future {retry_client_obj}, std::net::SocketAddr, &'r std::net::SocketAddr, &'s std::net::SocketAddr, u32, impl core::future::future::Future, impl core::future::future::Future, ()}]`
- = note: required because it appears within the type `std::future::GenFuture<[static generator@iml-request-retry/examples/demo-server-client.rs:43:31: 45:6 addr:std::net::SocketAddr for<'r, 's, 't0, 't1> {for<'_> fn(&std::net::SocketAddr, u32) -> impl core::future::future::Future {retry_client_obj}, std::net::SocketAddr, &'r std::net::SocketAddr, &'s std::net::SocketAddr, u32, impl core::future::future::Future, impl core::future::future::Future, ()}]>`
- = note: required because it appears within the type `impl core::future::future::Future`
- error: aborting due to previous error
- For more information about this error, try `rustc --explain E0277`.
- error: could not compile `iml-request-retry`.
- To learn more, run the command again with --verbose.
- Process finished with exit code 101
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement