Crate hardlight

source ·

Re-exports

Macros

  • A macro to create a factory function for a handler. Example:

Structs

Enums

Constants

Traits

Functions

Type Definitions

  • The RpcResponseSender is used to send the response of an RPC call back to the application. When an application sends an RPC call to the server, it will provide a serialized RPC call (method + args) and one of these senders. The application will await the response on the receiver side of the channel.
  • A tokio MPSC channel that is used to send state updates to the runtime. The runtime will then send these updates to the client.

Attribute Macros

  • Takes any ast as an input and annotates it with useful attributes for data serialization and deserialization. This consists of Archive + Serialize + Deserialize, for the root type and CheckBytes for the archived version.
  • This attribute is used to mark a struct as an RPC handler. Currently, this just adds the #[async_trait::async_trait] attribute to the struct.