Lines Matching refs:Point
65 NOTE = RouteNote { location: Some(Point { latitude: 409146139, longitude: -746188906 }), message: "…
112 rpc GetFeature(Point) returns (Feature) {}
134 rpc RecordRoute(stream Point) returns (RouteSummary) {}
150 response types used in our service methods - for example, here's the `Point` message type:
156 message Point {
206 - Struct definitions for message types `Point`, `Rectangle`, `Feature`, `RouteNote`, `RouteSummary`.
255 use routeguide::{Feature, Point, Rectangle, RouteNote, RouteSummary};
274 async fn get_feature(&self, _request: Request<Point>) -> Result<Response<Feature>, Status> {
289 _request: Request<tonic::Streaming<Point>>,
338 Next, we need to implement `Hash` and `Eq` for `Point`, so we can use point values as map keys:
345 impl Hash for Point {
355 impl Eq for Point {}
372 - A single value, e.g `Point`, `Rectangle`, or even a message type that includes a repeated field.
376 Let's look at the simplest method first, `get_feature`, which just gets a `tonic::Request<Point>`
377 from the client and tries to find a feature at the given `Point`. If no feature is found, it returns
381 async fn get_feature(&self, request: Request<Point>) -> Result<Response<Feature>, Status> {
429 `record_route`, where we get a stream of `Point`s from the client and return a single `RouteSummary`
431 `tonic::Request<tonic::Streaming<Point>>`.
441 request: Request<tonic::Streaming<Point>>,
473 In other words, we build a summary value as we process each `Point` in our stream, one by one.
600 use routeguide::{Point, Rectangle, RouteNote};
632 .get_feature(Request::new(Point {
640 We call the `get_feature` client method, passing a single `Point` value wrapped in a
655 lo: Some(Point {
659 hi: Some(Point {
686 The client-side streaming method `record_route` takes a stream of `Point`s and returns a single
717 fn random_point(rng: &mut ThreadRng) -> Point {
720 Point {
727 We build a vector of a random number of `Point` values (between 2 and 100) and then convert
753 location: Some(Point {