Crate toy_rpc_macros[][src]

Expand description

Provides proc_macros for toy-rpc.

This is exported in toy_rpc as the toy_rpc::macros module.

Macros

A macro that impls serde::Deserializer by simply calling the corresponding functions of the inner deserializer

Attribute Macros

“Export” methods in the impl block with #[export_method] attribute. Methods without the attribute will not be affected. This will also generate client stub.

“Exports” methods defined in the trait with the #[export_method] attribute. Methods not marked with #[export_method] will not be affected.

This macro implements the toy_rpc::util::RegisterService trait to allow convenient registration of the service. This should be used along with the macro #[export_trait].

Derive Macros

Implements toy_rpc::pubsub::Topic trait for a type. The type will also be the associated type Topic::Item, and thus the derived type must implement both serde::Serialize and serde::Deserialize.