Crate toy_rpc_macros

Source
Expand description

Provides proc_macros for toy-rpc.

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

Macros§

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

Attribute Macros§

export_impl
“Export” methods in the impl block with #[export_method] attribute. Methods without the attribute will not be affected. This will also generate client stub.
export_trait
“Exports” methods defined in the trait with the #[export_method] attribute. Methods not marked with #[export_method] will not be affected.
export_trait_impl
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§

Topic
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.