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::RegisterServicetrait to allow convenient registration of the service. This should be used along with the macro#[export_trait].
Derive Macros§
- Topic
- Implements
toy_rpc::pubsub::Topictrait for a type. The type will also be the associated typeTopic::Item, and thus the derived type must implement bothserde::Serializeandserde::Deserialize.