Skip to content

Commit

Permalink
Move the incoming_handler impl into http_impl
Browse files Browse the repository at this point in the history
  • Loading branch information
elliottt committed Sep 21, 2023
1 parent fc58a2e commit 4871e00
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 deletions.
11 changes: 11 additions & 0 deletions crates/wasi-http/src/http_impl.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use crate::bindings::http::{
incoming_handler::{self, IncomingRequest, ResponseOutparam},
outgoing_handler,
types::{FutureIncomingResponse, OutgoingRequest, RequestOptions, Scheme},
};
Expand Down Expand Up @@ -178,6 +179,16 @@ impl<T: WasiHttpView> outgoing_handler::Host for T {
}
}

impl<T: WasiHttpView> incoming_handler::Host for T {
fn handle(
&mut self,
_request: IncomingRequest,
_response_out: ResponseOutparam,
) -> wasmtime::Result<()> {
todo!()
}
}

fn timeout_error(kind: &str) -> anyhow::Error {
anyhow::anyhow!(crate::bindings::http::types::Error::TimeoutError(format!(
"{kind} timed out"
Expand Down
12 changes: 0 additions & 12 deletions crates/wasi-http/src/incoming_handler.rs

This file was deleted.

1 change: 0 additions & 1 deletion crates/wasi-http/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use std::fmt::{self, Display};

pub mod body;
pub mod http_impl;
pub mod incoming_handler;
pub mod proxy;
pub mod types;
pub mod types_impl;
Expand Down

0 comments on commit 4871e00

Please sign in to comment.