[−][src]Struct hyper_unix_connector::UnixConnector
Wrapper around tokio::net::UnixListener
that works with hyper
servers.
Useful for making hyper
servers listen on Unix sockets. For the client side, see
UnixClient
.
Example
use hyper::service::{make_service_fn, service_fn}; use hyper::{Body, Error, Response, Server}; use hyper_unix_connector::UnixConnector; let uc: UnixConnector = tokio::net::UnixListener::bind("./my-unix-socket") .unwrap() .into(); Server::builder(uc).serve(make_service_fn(|_| { async move { Ok::<_, Error>(service_fn(|_| { async move { Ok::<_, Error>(Response::new(Body::from("Hello, World"))) } })) } }));
Trait Implementations
impl Accept for UnixConnector
[src][+]
impl Debug for UnixConnector
[src][+]
impl From<UnixListener> for UnixConnector
[src][+]
impl Into<UnixListener> for UnixConnector
[src][+]
Auto Trait Implementations
impl !RefUnwindSafe for UnixConnector
[src]
impl Send for UnixConnector
[src]
impl Sync for UnixConnector
[src]
impl Unpin for UnixConnector
[src]
impl !UnwindSafe for UnixConnector
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> From<T> for T
[src][+]
impl<T> Instrument for T
[src][+]
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,