Expand description
Trait and utils for client-side task
Provided Macros
#[client_task]: For defining a client-side RPC task on a struct. It will not generate ClientTask trait (it’s optional to you to define ClientTaskAction with it)#[client_task_enum]: For creating an enum that delegates to client task variants. It will generate ClientTask trait for the enum
Structs§
- Client
Task Common - A common struct for every ClientTask
Traits§
- Client
Task - Sum up trait for client task, including request and response
- Client
Task Action - Get RpcAction from a enum task, or a sub-type that fits multiple RpcActions
- Client
Task Decode - Decode the response from server and assign to the task struct
- Client
Task Done - How to notify from Rpc framework to user when a task is done
- Client
Task Encode - Encode the request to buffer that can be send to server
- Client
Task GetResult - client_task_enum should impl this for user, not used by framework
Attribute Macros§
- client_
task #[client_task]- client_
task_ enum #[client_task_enum]