Trisfald / tonic_include_proto

Helper macro to use with tonic gRPC

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tonic include_proto utilities

A crate to make using tonic::include_proto less painful.

namespaced!

This macro invokes the macro tonic::include_proto for multiple protobuf packages and each of them are placed in the correct namespace.

Example

The code:

tonic_include_proto::namespaced!("x", "x.y", "x.z");

is equivalent to:

mod x {
    tonic::include_proto!("x");
    mod y {
        tonic::include_proto!("x.y");
    }
    mod z {
        tonic::include_proto!("x.z");
    }
}

About

Helper macro to use with tonic gRPC

License:MIT License


Languages

Language:Rust 100.0%