pub struct HttpPlane { /* private fields */ }Expand description
HTTP data plane that receives traffic from Cloudflare
Implementations§
Source§impl HttpPlane
impl HttpPlane
pub fn new( router: Arc<Router>, base_domain: String, response_registry: ResponseRegistry, tls_acceptor: Option<TlsAcceptor>, ) -> Arc<Self>
Sourcepub async fn run(self: Arc<Self>, addr: SocketAddr) -> Result<()>
pub async fn run(self: Arc<Self>, addr: SocketAddr) -> Result<()>
Start listening for HTTP/HTTPS traffic from Cloudflare
Sourcepub async fn run_with_listener(
self: Arc<Self>,
listener: TcpListener,
) -> Result<()>
pub async fn run_with_listener( self: Arc<Self>, listener: TcpListener, ) -> Result<()>
Start accepting connections from a pre-bound listener
This is useful for testing where the caller wants to bind to an ephemeral port and get the actual address before starting the server.
Auto Trait Implementations§
impl !Freeze for HttpPlane
impl !RefUnwindSafe for HttpPlane
impl Send for HttpPlane
impl Sync for HttpPlane
impl Unpin for HttpPlane
impl !UnwindSafe for HttpPlane
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more