Macro dispatch_service_sync

Source
macro_rules! dispatch_service_sync {
    (
        $service:ty,
        $hash_by:ident : $hash_type:ty,

        [ $(
            $shard_method:ident ($shard_request:ty) -> $shard_reply:ty,
        )* ],

        [ $(
            $mutable_method:ident ($mutable_request:ty) -> $mutable_reply:ty,
        )* ],

        [ $(
            $readonly_method:ident ($readonly_request:ty) -> $readonly_reply:ty,
        )* ]
    ) => { ... };
}
Expand description

Similar to the dispatch_service_async but in sync mode.

See the module-level documentation for more information about the 2 modes.

The only API difference is that the methods in DispatchBackendShard and DispatchBackendItem are sync but not async fn.

And there is also a sync mode DictService example.