hyper_client_sockets/
lib.rs#![cfg_attr(docsrs, feature(doc_cfg))]
#[cfg(any(feature = "unix", feature = "vsock", feature = "firecracker"))]
use std::future::Future;
#[cfg(any(feature = "unix", feature = "firecracker"))]
use std::path::Path;
#[cfg(feature = "tokio-backend")]
#[cfg_attr(docsrs, doc(cfg(feature = "tokio-backend")))]
pub mod tokio;
#[cfg(feature = "async-io-backend")]
#[cfg_attr(docsrs, doc(cfg(feature = "async-io-backend")))]
pub mod async_io;
#[cfg(feature = "hyper-util")]
#[cfg_attr(docsrs, doc(cfg(feature = "hyper-util")))]
pub mod uri;
#[cfg(feature = "hyper-util")]
#[cfg_attr(docsrs, doc(cfg(feature = "hyper-util")))]
pub mod connector;
pub trait Backend: Clone {
#[cfg(feature = "unix")]
#[cfg_attr(docsrs, doc(cfg(feature = "unix")))]
type UnixIo: hyper::rt::Read + hyper::rt::Write + Send + Unpin;
#[cfg(feature = "vsock")]
#[cfg_attr(docsrs, doc(cfg(feature = "vsock")))]
type VsockIo: hyper::rt::Read + hyper::rt::Write + Send + Unpin;
#[cfg(feature = "firecracker")]
#[cfg_attr(docsrs, doc(cfg(feature = "firecracker")))]
type FirecrackerIo: hyper::rt::Read + hyper::rt::Write + Send + Unpin;
#[cfg(feature = "unix")]
#[cfg_attr(docsrs, doc(cfg(feature = "unix")))]
fn connect_to_unix_socket(socket_path: &Path) -> impl Future<Output = Result<Self::UnixIo, std::io::Error>> + Send;
#[cfg(feature = "vsock")]
#[cfg_attr(docsrs, doc(cfg(feature = "vsock")))]
fn connect_to_vsock_socket(
addr: vsock::VsockAddr,
) -> impl Future<Output = Result<Self::VsockIo, std::io::Error>> + Send;
#[cfg(feature = "firecracker")]
#[cfg_attr(docsrs, doc(cfg(feature = "firecracker")))]
fn connect_to_firecracker_socket(
host_socket_path: &Path,
guest_port: u32,
) -> impl Future<Output = Result<Self::FirecrackerIo, std::io::Error>> + Send;
}