cannot be sent between threads safely
64 | ) -> anyhow::Result<Response<()>> {
| _____________________________________________________________^
... |
127 | | Ok(Response::new(()))
128 | | }
| |_____^ future created by async block is not `Send`
|
= help: within `impl futures::Future`, the trait `std::marker::Send` is not implemented for `*mut libparted_sys::_PedDevice`
note: future is not `Send` as this value is used across an await
|
100 | let dev = libparted::Device::get(&device).map_err(|source| {
| --- has type `libparted::Device<'_>` which is not `Send`
...
168 |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ await occurs here, with `dev` maybe used later
...
186 | }
| - `dev` is later dropped here
= note: required for the cast to the object type `dyn futures::Future<Output = std::result::Result<tonic::Response<()>, anyhow::Error>> + std::marker::Send
В общем случае нет. (есть https://lib.rs/crates/diplomatic-bag, но это изврат)
мда... приплыл...
Обсуждают сегодня