macro_rules! define_service { ( $vis:vis $serv:ident : { $($ty:tt)* } ) => { ... }; }
Expand description
Define a service reference type.
define_service!(MyService : { "f": func!(() -> () query) })
expands to struct MyService(Service)
, which implements CandidType
with the provided type and MyService::new(principal)
.