macro_rules! implement_client_api { ( $( $trait: ident: { $( $func_ident: ident: ( &mut self $(, $input_ident: ident: $input_type: ty)* $(,)? ) -> $outputs: ty ),* $(,)? } ),* $(,)* ) => { ... }; }
Expand description
Implements the ClientApi
for the TestEnvironment
struct.
This macro exposes a high-level API for specifying the ClientApi
traits to implement for the
TestEnvironment
. The trait methods are implements through a simple mechanism which creates a
SystemService
object from the kernel and calls the trait method on the SystemService
object.
The syntax supported by this macro is as follows:
implement_client_api! {
trait_name: {
trait_method1: (args: ArgTypes) -> ReturnTypes,
trait_method2: (args: ArgTypes) -> ReturnTypes,
}
}
This macro is only used internally in this crate for easy implementation of the ClientApi
and is not meant to be used outside or exported.