/// Create a `Service` from a function that never errors.
///
/// # Example
///
/// ```rust
/// use hyper::{Body, Request, Response};
/// use hyper::service::service_fn_ok;
///
/// let service = service_fn_ok(|req: Request<Body>| {
///     println!("request: {} {}", req.method(), req.uri());
///     Response::new(Body::from("Hello World"))
/// });
/// ```
Create a `Service` from a function that never errors.
Create a ` Service ` from a function that never errors .
pub fn service_fn_ok<F, R, S>(f: F) -> ServiceFnOk<F, R>
where
    F: FnMut(Request<R>) -> Response<S>,
    S: Payload,
{
    ServiceFnOk {
        f,
        _req: PhantomData,
    }
}
pub fn service_fn_ok < F , R , S > ( f : F ) -> ServiceFnOk < F , R > where F : FnMut ( Request < R > ) -> Response < S > , S : Payload , { ServiceFnOk { f , _req : PhantomData , } }
Create a `Service` from a function that never errors.
Create a ` Service ` from a function that never errors .
f
F
example
```rust
use hyper::{Body, Request, Response};
use hyper::service::service_fn_ok.

let service = service_fn_ok(|req: Request| {
println!("request: {} {}", req.method(), req.uri());
Response::new(Body::from("Hello World"))
});
```
` ` ` rust use hyper :: { Body Request Response } ; use hyper :: service :: service_fn_ok . let service = service_fn_ok ( |req : Request| { println! ( " request : {} {} " req . method () req . uri () ) ; Response :: new ( Body :: from ( " Hello World " )) } ) ; ` ` `