Lines Matching refs:proto
6 - Define a service in a `.proto` file.
24 With gRPC we can define our service once in a `.proto` file and implement clients and servers in
85 [protocol buffers]. We will keep our `.proto` files in a directory in our crate's root.
86 Note that Tonic does not really care where our `.proto` definitions live. We will see how to use
90 $ mkdir proto && touch proto/route_guide.proto
93 You can see the complete `.proto` file in
94 [examples/proto/routeguide/route_guide.proto][routeguide-proto].
96 To define a service, you specify a named `service` in your `.proto` file:
98 ```proto
110 ```proto
119 ```proto
131 ```proto
143 ```proto
149 Our `.proto` file also contains protocol buffer message type definitions for all the request and
151 ```proto
162 [routeguide-proto]: https://github.com/hyperium/tonic/blob/master/examples/proto/routeguide/route_g…
168 and our `.proto` definitions in sync.
195 tonic_build::compile_protos("proto/route_guide.proto")
259 the package declared in our `.proto` file, not a filename, e.g "routeguide.rs".
370 are declared in our *service* `.proto` definition. It can be either:
803 More generally, whenever we want to keep our `.proto` definitions in a central place and generate
809 1) We can keep our `.proto` definitions in a separate crate and generate our code on demand, as
819 .compile_protos(&["path/my_proto.proto"], &["path"])
827 2) Similarly, we could also keep the `.proto` definitions in a separate crate and then use that