Macro declare_binder_interface

Source
macro_rules! declare_binder_interface {
    {
        $interface:path[$descriptor:expr] {
            native: {
                $native:ident($on_transact:path),
                $(adapter: $native_adapter:ident,)?
                $(r#async: $native_async:ident,)?
            },
            proxy: $proxy:ident,
            $(r#async: $async_interface:ident,)?
        }
    } => { ... };
    {
        $interface:path[$descriptor:expr] {
            native: {
                $native:ident($on_transact:path),
                $(adapter: $native_adapter:ident,)?
                $(r#async: $native_async:ident,)?
            },
            proxy: $proxy:ident,
            $(r#async: $async_interface:ident,)?
            stability: $stability:expr,
        }
    } => { ... };
    {
        $interface:path[$descriptor:expr] {
            native: {
                $native:ident($on_transact:path),
                $(adapter: $native_adapter:ident,)?
                $(r#async: $native_async:ident,)?
            },
            proxy: $proxy:ident {
                $($fname:ident: $fty:ty = $finit:expr),*
            },
            $(r#async: $async_interface:ident,)?
        }
    } => { ... };
    {
        $interface:path[$descriptor:expr] {
            native: {
                $native:ident($on_transact:path),
                $(adapter: $native_adapter:ident,)?
                $(r#async: $native_async:ident,)?
            },
            proxy: $proxy:ident {
                $($fname:ident: $fty:ty = $finit:expr),*
            },
            $(r#async: $async_interface:ident,)?
            stability: $stability:expr,
        }
    } => { ... };
    {
        $interface:path[$descriptor:expr] {
            @doc[$native_doc:expr]
            native: {
                $native:ident($on_transact:path),
                $(adapter: $native_adapter:ident,)?
                $(r#async: $native_async:ident,)?
            },
            @doc[$proxy_doc:expr]
            proxy: $proxy:ident {
                $($fname:ident: $fty:ty = $finit:expr),*
            },
            $( r#async: $async_interface:ident, )?

            stability: $stability:expr,
        }
    } => { ... };
}
Expand description

Declare a binder interface.

This is mainly used internally by the AIDL compiler.