Trait FastlyHttpCache
Source pub trait FastlyHttpCache {
Show 24 methods
// Required methods
fn is_request_cacheable(
&mut self,
mem: &mut GuestMemory<'_>,
req_handle: RequestHandle,
) -> Result<IsCacheable, Error>;
fn get_suggested_cache_key(
&mut self,
mem: &mut GuestMemory<'_>,
req_handle: RequestHandle,
key_out_ptr: GuestPtr<u8>,
key_out_len: u32,
nwritten_out: GuestPtr<u32>,
) -> Result<(), Error>;
fn lookup<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
mem: &'life1 mut GuestMemory<'life2>,
req_handle: RequestHandle,
options_mask: HttpCacheLookupOptionsMask,
options: GuestPtr<HttpCacheLookupOptions>,
) -> Pin<Box<dyn Future<Output = Result<HttpCacheHandle, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn transaction_lookup<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
mem: &'life1 mut GuestMemory<'life2>,
req_handle: RequestHandle,
options_mask: HttpCacheLookupOptionsMask,
options: GuestPtr<HttpCacheLookupOptions>,
) -> Pin<Box<dyn Future<Output = Result<HttpCacheHandle, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn transaction_insert<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
mem: &'life1 mut GuestMemory<'life2>,
handle: HttpCacheHandle,
resp_handle: ResponseHandle,
options_mask: HttpCacheWriteOptionsMask,
options: GuestPtr<HttpCacheWriteOptions>,
) -> Pin<Box<dyn Future<Output = Result<BodyHandle, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn transaction_insert_and_stream_back<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
mem: &'life1 mut GuestMemory<'life2>,
handle: HttpCacheHandle,
resp_handle: ResponseHandle,
options_mask: HttpCacheWriteOptionsMask,
options: GuestPtr<HttpCacheWriteOptions>,
) -> Pin<Box<dyn Future<Output = Result<(BodyHandle, HttpCacheHandle), Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn transaction_update<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
mem: &'life1 mut GuestMemory<'life2>,
handle: HttpCacheHandle,
resp_handle: ResponseHandle,
options_mask: HttpCacheWriteOptionsMask,
options: GuestPtr<HttpCacheWriteOptions>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn transaction_update_and_return_fresh<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
mem: &'life1 mut GuestMemory<'life2>,
handle: HttpCacheHandle,
resp_handle: ResponseHandle,
options_mask: HttpCacheWriteOptionsMask,
options: GuestPtr<HttpCacheWriteOptions>,
) -> Pin<Box<dyn Future<Output = Result<HttpCacheHandle, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn transaction_record_not_cacheable<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
mem: &'life1 mut GuestMemory<'life2>,
handle: HttpCacheHandle,
options_mask: HttpCacheWriteOptionsMask,
options: GuestPtr<HttpCacheWriteOptions>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn transaction_abandon<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
mem: &'life1 mut GuestMemory<'life2>,
handle: HttpCacheHandle,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn close<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
mem: &'life1 mut GuestMemory<'life2>,
handle: HttpCacheHandle,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn get_suggested_backend_request<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
mem: &'life1 mut GuestMemory<'life2>,
handle: HttpCacheHandle,
) -> Pin<Box<dyn Future<Output = Result<RequestHandle, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn get_suggested_cache_options<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
mem: &'life1 mut GuestMemory<'life2>,
handle: HttpCacheHandle,
response: ResponseHandle,
options_mask: HttpCacheWriteOptionsMask,
options: GuestPtr<HttpCacheWriteOptions>,
options_mask_out: GuestPtr<HttpCacheWriteOptionsMask>,
options_out: GuestPtr<HttpCacheWriteOptions>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn prepare_response_for_storage<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
mem: &'life1 mut GuestMemory<'life2>,
handle: HttpCacheHandle,
response: ResponseHandle,
) -> Pin<Box<dyn Future<Output = Result<(HttpStorageAction, ResponseHandle), Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn get_found_response<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
mem: &'life1 mut GuestMemory<'life2>,
handle: HttpCacheHandle,
transform_for_client: u32,
) -> Pin<Box<dyn Future<Output = Result<(ResponseHandle, BodyHandle), Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn get_state<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
mem: &'life1 mut GuestMemory<'life2>,
handle: HttpCacheHandle,
) -> Pin<Box<dyn Future<Output = Result<CacheLookupState, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn get_length<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
mem: &'life1 mut GuestMemory<'life2>,
handle: HttpCacheHandle,
) -> Pin<Box<dyn Future<Output = Result<CacheObjectLength, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn get_max_age_ns<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
mem: &'life1 mut GuestMemory<'life2>,
handle: HttpCacheHandle,
) -> Pin<Box<dyn Future<Output = Result<CacheDurationNs, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn get_stale_while_revalidate_ns<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
mem: &'life1 mut GuestMemory<'life2>,
handle: HttpCacheHandle,
) -> Pin<Box<dyn Future<Output = Result<CacheDurationNs, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn get_age_ns<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
mem: &'life1 mut GuestMemory<'life2>,
handle: HttpCacheHandle,
) -> Pin<Box<dyn Future<Output = Result<CacheDurationNs, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn get_hits<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
mem: &'life1 mut GuestMemory<'life2>,
handle: HttpCacheHandle,
) -> Pin<Box<dyn Future<Output = Result<CacheHitCount, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn get_sensitive_data<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
mem: &'life1 mut GuestMemory<'life2>,
handle: HttpCacheHandle,
) -> Pin<Box<dyn Future<Output = Result<IsSensitive, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn get_surrogate_keys<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
mem: &'life1 mut GuestMemory<'life2>,
handle: HttpCacheHandle,
surrogate_keys_out_ptr: GuestPtr<u8>,
surrogate_keys_out_len: u32,
nwritten_out: GuestPtr<u32>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn get_vary_rule<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
mem: &'life1 mut GuestMemory<'life2>,
handle: HttpCacheHandle,
vary_rule_out_ptr: GuestPtr<u8>,
vary_rule_out_len: u32,
nwritten_out: GuestPtr<u32>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}