Skip to main content

Module task

Module task 

Source
Expand description

Trait for server-side task, and predefined task structures

There are pre-defined structs that impl ServerTaskDecode and ServerTaskResp:

Provided macros:

Structs§

RespNoti
A writer channel to send response to the server framework.
ServerTaskVariant
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.
ServerTaskVariantFull
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§

ServerTaskAction
Get RpcAction from a enum task, or a sub-type that fits multiple RpcActions
ServerTaskDecode
How to decode a server request
ServerTaskDone
How to notify Rpc framework when a task is done
ServerTaskEncode
How to encode a server response
ServerTaskResp
Sum up trait for server response task

Attribute Macros§

server_task_enum
#[server_task_enum]