dispatch_service_sync

Macro dispatch_service_sync 

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

        [ $(
            $shard_mutable_method:ident ($shard_mutable_request:ty) -> $shard_mutable_reply:ty,
        )* ],

        [ $(
            $shard_readonly_method:ident ($shard_readonly_request:ty) -> $shard_readonly_reply:ty,
        )* ],

        [ $(
            $item_mutable_method:ident ($item_mutable_request:ty) -> $item_mutable_reply:ty,
        )* ],

        [ $(
            $item_readonly_method:ident ($item_readonly_request:ty) -> $item_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.