Add the src/server.rs source file and add generated modules to it:
mod ring;
mod ring_grpc;
We need these modules because we will implement the Ring trait for our RPC handler. Look at the types we will use:
use crate::ring::Empty;
use crate::ring_grpc::{Ring, RingServer};
use failure::Error;
use grpc::{Error as GrpcError, ServerBuilder, SingleResponse, RequestOptions};
use grpc_ring::Remote;
use log::{debug, trace};
use std::env;
use std::net::SocketAddr;
use std::sync::Mutex;
use std::sync::mpsc::{channel, Receiver, Sender};
The types you are not familiar with yet are ServerBuilder, which is used to create a server instance and fill it with service implementations, and SingleResponse is the result of handler calls. The other types you already know.