embassy-sync

Crates

git

Versions

default

Flavors

Module rpc_service

Module rpc_service 

Source
Expand description

Async interface for dispatching FnOnce(&mut T) -> R jobs to a dedicated runner task with exclusive access to T.

Callers submit an FnOnce(&mut T) -> R via RpcService::call. A dedicated runner, started with RpcService::run, executes closures one at a time with exclusive &mut T access and sends results back. Closures and return values are stored inline in a fixed-size slot of S bytes, checked at compile time.

Structsยง

CallFuture
Future returned by RpcService::call.
RpcService
Dispatch closures for execution on a dedicated runner task.