-
Notifications
You must be signed in to change notification settings - Fork 42
Expand file tree
/
Copy pathhttp_cache.rs
More file actions
41 lines (38 loc) · 1.14 KB
/
http_cache.rs
File metadata and controls
41 lines (38 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
use {
crate::component::bindings::{
fastly::adapter::adapter_http_cache,
fastly::compute::{http_cache, types},
},
crate::{error::Error, linking::ComponentCtx},
wasmtime::component::Resource,
};
impl adapter_http_cache::Host for ComponentCtx {
fn lookup(
&mut self,
_req_handle: Resource<http_cache::Request>,
_options: adapter_http_cache::LookupOptions,
) -> Result<Resource<http_cache::Entry>, types::Error> {
Err(Error::Unsupported {
msg: "HTTP Cache API primitives not yet supported",
}
.into())
}
fn transaction_lookup(
&mut self,
_req_handle: Resource<http_cache::Request>,
_options: adapter_http_cache::LookupOptions,
) -> Result<Resource<http_cache::Entry>, types::Error> {
Err(Error::Unsupported {
msg: "HTTP Cache API primitives not yet supported",
}
.into())
}
}
impl adapter_http_cache::HostExtraLookupOptions for ComponentCtx {
fn drop(
&mut self,
_h: Resource<adapter_http_cache::ExtraLookupOptions>,
) -> wasmtime::Result<()> {
Ok(())
}
}