Expand description
Trait for server-side task, and predefined task structures
There are pre-defined structs that impl ServerTaskDecode and ServerTaskResp:
- ServerTaskVariant is for the situation to map a request struct to a response struct
- ServerTaskVariantFull is for the situation of holding the request and response msg in the same struct
Provided macros:
#[server_task_enum]: For defining a server-side RPC task enum.
Structs§
- Resp
Noti - A writer channel to send response to the server framework.
- Server
Task Variant - A container that impl ServerTaskResp to show an example, presuming you have a different types to represent Request and Response. You can write your customize version.
- Server
Task Variant Full - A container that impl ServerTaskResp to show an example, presuming you have a type to carry both Request and Response. You can write your customize version.
Traits§
- Server
Task Action - Get RpcAction from a enum task, or a sub-type that fits multiple RpcActions
- Server
Task Decode - How to decode a server request
- Server
Task Done - How to notify Rpc framework when a task is done
- Server
Task Encode - How to encode a server response
- Server
Task Resp - Sum up trait for server response task
Attribute Macros§
- server_
task_ enum #[server_task_enum]