[−][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 Into<UnixListener> for UnixConnector
[src]
fn into(self) -> UnixListener
[src]
impl From<UnixListener> for UnixConnector
[src]
fn from(u: UnixListener) -> Self
[src]
impl Accept for UnixConnector
[src]
Auto Trait Implementations
impl Send for UnixConnector
impl Sync for UnixConnector
impl Unpin for UnixConnector
impl !UnwindSafe for UnixConnector
impl !RefUnwindSafe for UnixConnector
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,