Session

Struct Session 

Source
pub struct Session {
    pub active_cpu_time_us: Arc<AtomicU64>,
    /* private fields */
}
Expand description

Data specific to an individual request, including any host-side allocations on behalf of the guest processing the request.

Fields§

§active_cpu_time_us: Arc<AtomicU64>

The amount of time we’ve spent on this session in microseconds.

Implementations§

Source§

impl Session

Source

pub fn new( downstream: DownstreamRequest, active_cpu_time_us: Arc<AtomicU64>, ctx: Arc<ExecuteCtx>, ) -> Session

Create an empty session.

Source

pub fn downstream_metadata( &self, handle: RequestHandle, ) -> Result<Option<&DownstreamMetadata>, HandleError>

Retrieve the downstream metadata address associated with a request handle.

Source

pub fn downstream_client_ip( &self, handle: RequestHandle, ) -> Result<Option<IpAddr>, HandleError>

Retrieve the downstream client IP address associated with a request handle.

Source

pub fn downstream_server_ip( &self, handle: RequestHandle, ) -> Result<Option<IpAddr>, HandleError>

Retrieve the IP address the downstream client connected to a request handle.

Source

pub fn downstream_compliance_region( &self, handle: RequestHandle, ) -> Result<Option<&str>, HandleError>

Retrieve the compliance region that received the request for the given handle.

Source

pub fn downstream_request_id( &self, handle: RequestHandle, ) -> Result<Option<u64>, HandleError>

Retrieve the request ID for the given request handle.

Source

pub fn downstream_request(&self) -> RequestHandle

Retrieve the handle corresponding to the most recent downstream request.

Source

pub fn downstream_request_body(&self) -> BodyHandle

Retrieve the handle corresponding to the downstream request body.

Source

pub fn downstream_original_headers( &self, handle: RequestHandle, ) -> Result<Option<&HeaderMap>, HandleError>

Access the header map that was copied from the original downstream request.

Source

pub fn send_downstream_response( &mut self, resp: Response<Body>, ) -> Result<(), Error>

Send the downstream response.

Yield an error if a response has already been sent.

§Panics

This method must only be called once per downstream request, after which attempting to send another response will trigger a panic.

Source

pub fn redirect_downstream_to_pushpin( &mut self, redirect_info: PushpinRedirectInfo, ) -> Result<(), Error>

Redirect the downstream request to Pushpin.

Yield an error if a response has already been sent.

§Panics

This method must only be called once per downstream request, after which attempting to send another response will trigger a panic.

Source

pub fn close_downstream_response_sender(&mut self, resp: Response<Body>)

Ensure the downstream response sender is closed, and send the provided response if it isn’t.

Source

pub fn insert_body(&mut self, body: Body) -> BodyHandle

Insert a Body into the session.

This method returns the BodyHandle, which can then be used to access and mutate the response parts.

Source

pub fn body(&self, handle: BodyHandle) -> Result<&Body, HandleError>

Get a reference to a Body, given its BodyHandle.

Returns a HandleError if the handle is not associated with a body in the session.

Source

pub fn body_mut(&mut self, handle: BodyHandle) -> Result<&mut Body, HandleError>

Get a mutable reference to a Body, given its BodyHandle.

Returns a HandleError if the handle is not associated with a body in the session.

Source

pub fn take_body(&mut self, handle: BodyHandle) -> Result<Body, HandleError>

Take ownership of a Body, given its BodyHandle.

Returns a HandleError if the handle is not associated with a body in the session.

Source

pub fn drop_body(&mut self, handle: BodyHandle) -> Result<(), HandleError>

Drop a Body from the Session, given its BodyHandle.

Returns a HandleError if the handle is not associated with a body in the session.

Source

pub fn begin_streaming( &mut self, handle: BodyHandle, ) -> Result<Body, HandleError>

Transition a normal Body into the write end of a streaming body, returning the original body with the read end appended.

Returns a HandleError if the handle is not associated with a body in the session.

Source

pub fn is_streaming_body(&self, handle: BodyHandle) -> bool

Returns true if and only if the provided BodyHandle is the downstream body being sent.

To get a mutable reference to the streaming body Sender, see Session::streaming_body_mut.

Source

pub fn streaming_body_mut( &mut self, handle: BodyHandle, ) -> Result<&mut StreamingBody, HandleError>

Get a mutable reference to the streaming body Sender, if and only if the provided BodyHandle is the downstream body being sent.

To check if a handle is the currently-streaming downstream response body, see Session::is_streaming_body.

Returns a HandleError if the handle is not associated with a body in the session.

Source

pub fn take_streaming_body( &mut self, handle: BodyHandle, ) -> Result<StreamingBody, HandleError>

Take ownership of a streaming body Sender, if and only if the provided BodyHandle is the downstream body being sent.

To check if a handle is the currently-streaming downstream response body, see Session::is_streaming_body.

Returns a HandleError if the handle is not associated with a body in the session.

Source

pub fn insert_request_parts(&mut self, parts: Parts) -> RequestHandle

Insert the Parts of a Request into the session.

This method returns a new RequestHandle, which can then be used to access and mutate the request parts.

Source

pub fn request_parts( &self, handle: RequestHandle, ) -> Result<&Parts, HandleError>

Get a reference to the Parts of a Request, given its RequestHandle.

Returns a HandleError if the handle is not associated with a request in the session.

Source

pub fn request_parts_mut( &mut self, handle: RequestHandle, ) -> Result<&mut Parts, HandleError>

Get a mutable reference to the Parts of a Request, given its RequestHandle.

Returns a HandleError if the handle is not associated with a request in the session.

Source

pub fn take_request_parts( &mut self, handle: RequestHandle, ) -> Result<Parts, HandleError>

Take ownership of the Parts of a Request, given its RequestHandle.

Returns a HandleError if the handle is not associated with a request in the session.

Source

pub fn insert_response_parts(&mut self, parts: Parts) -> ResponseHandle

Insert the Parts of a Response into the session.

This method returns a new ResponseHandle, which can then be used to access and mutate the response parts.

Source

pub fn response_parts( &self, handle: ResponseHandle, ) -> Result<&Parts, HandleError>

Get a reference to the Parts of a Response, given its ResponseHandle.

Returns a HandleError if the handle is not associated with a response in the session.

Source

pub fn response_parts_mut( &mut self, handle: ResponseHandle, ) -> Result<&mut Parts, HandleError>

Get a mutable reference to the Parts of a Response, given its ResponseHandle.

Returns a HandleError if the handle is not associated with a response in the session.

Source

pub fn take_response_parts( &mut self, handle: ResponseHandle, ) -> Result<Parts, HandleError>

Take ownership of the Parts of a Response, given its ResponseHandle.

Returns a HandleError if the handle is not associated with a response in the session.

Source

pub fn insert_response( &mut self, resp: Response<Body>, ) -> (ResponseHandle, BodyHandle)

Source

pub fn log_endpoint_handle(&mut self, name: &[u8]) -> EndpointHandle

Get an EndpointHandle from the session, corresponding to the provided endpoint name. A new backing LogEndpoint will be created if one does not already exist.

Source

pub fn log_endpoint( &self, handle: EndpointHandle, ) -> Result<&LogEndpoint, HandleError>

Get a reference to a LogEndpoint, given its EndpointHandle.

Returns a HandleError if the handle is not associated with an endpoint in the session.

Source

pub fn acl_handle_by_name(&mut self, name: &str) -> Option<AclHandle>

Source

pub fn acl_by_handle(&self, handle: AclHandle) -> Option<Arc<Acl>>

Source

pub fn backends(&self) -> &Backends

Get the collection of static backends.

Source

pub fn backend(&self, name: &str) -> Option<&Arc<Backend>>

Look up a backend by name.

Source

pub fn dynamic_backend(&self, name: &str) -> Option<&Arc<Backend>>

Look up a dynamic backend (only) by name.

Source

pub fn backend_names(&self) -> impl Iterator<Item = &String>

Return the full list of static and dynamic backend names as an Iterator.

Source

pub fn add_backend(&mut self, name: &str, info: Backend) -> bool

Try to add a backend with the given name prefix to our set of current backends. Upon success, return true. If the name already exists somewhere, return false; the caller should signal an appropriate error.

Source

pub fn tls_config(&self) -> &TlsConfig

Access the TLS configuration.

Source

pub fn device_detection_lookup(&self, user_agent: &str) -> Option<String>

Source

pub fn dictionary_handle( &mut self, name: &str, ) -> Result<DictionaryHandle, Error>

Look up a dictionary-handle by name.

Source

pub fn dictionary( &self, handle: DictionaryHandle, ) -> Result<&LoadedDictionary, HandleError>

Look up a dictionary by dictionary-handle.

Source

pub fn dictionaries(&self) -> &Dictionaries

Access the dictionary map.

Source

pub fn geolocation_lookup(&self, addr: &IpAddr) -> Option<String>

Source

pub fn ngwaf_response(&self) -> String

Retrieve the compliance region that received the request for this session.

Source

pub fn kv_store(&self) -> &ObjectStores

Source

pub fn kv_store_handle(&mut self, key: &str) -> KvStoreHandle

Source

pub fn get_kv_store_key(&self, handle: KvStoreHandle) -> Option<&ObjectStoreKey>

Source

pub fn kv_insert( &self, obj_store_key: ObjectStoreKey, obj_key: ObjectKey, obj: Vec<u8>, mode: Option<KvInsertMode>, generation: Option<u64>, metadata: Option<String>, ttl: Option<Duration>, ) -> Result<(), KvStoreError>

Source

pub fn insert_pending_kv_insert( &mut self, pending: PendingKvInsertTask, ) -> KvStoreInsertHandle

Insert a [PendingKvInsert] into the session.

This method returns a new PendingKvInsertHandle, which can then be used to access and mutate the pending insert.

Source

pub fn take_pending_kv_insert( &mut self, handle: PendingKvInsertHandle, ) -> Result<PendingKvInsertTask, HandleError>

Take ownership of a [PendingKvInsert], given its PendingKvInsertHandle.

Returns a HandleError if the handle is not associated with a pending insert in the session.

Source

pub fn pending_kv_insert( &self, handle: PendingKvInsertHandle, ) -> Result<&PendingKvInsertTask, HandleError>

Get a reference to a [PendingInsert], given its PendingKvInsertHandle.

Returns a HandleError if the handle is not associated with a insert in the session.

Source

pub fn kv_delete( &self, obj_store_key: ObjectStoreKey, obj_key: ObjectKey, ) -> Result<bool, KvStoreError>

Source

pub fn insert_pending_kv_delete( &mut self, pending: PendingKvDeleteTask, ) -> PendingKvDeleteHandle

Insert a [PendingKvDelete] into the session.

This method returns a new PendingKvDeleteHandle, which can then be used to access and mutate the pending delete.

Source

pub fn take_pending_kv_delete( &mut self, handle: PendingKvDeleteHandle, ) -> Result<PendingKvDeleteTask, HandleError>

Take ownership of a [PendingKvDelete], given its PendingKvDeleteHandle.

Returns a HandleError if the handle is not associated with a pending delete in the session.

Source

pub fn pending_kv_delete( &self, handle: PendingKvDeleteHandle, ) -> Result<&PendingKvDeleteTask, HandleError>

Get a reference to a [PendingDelete], given its PendingKvDeleteHandle.

Returns a HandleError if the handle is not associated with a delete in the session.

Source

pub fn obj_lookup( &self, obj_store_key: ObjectStoreKey, obj_key: ObjectKey, ) -> Result<Option<ObjectValue>, KvStoreError>

Source

pub fn insert_pending_kv_lookup( &mut self, pending: PendingKvLookupTask, ) -> PendingKvLookupHandle

Insert a [PendingLookup] into the session.

This method returns a new PendingKvLookupHandle, which can then be used to access and mutate the pending lookup.

Source

pub fn take_pending_kv_lookup( &mut self, handle: PendingKvLookupHandle, ) -> Result<PendingKvLookupTask, HandleError>

Take ownership of a [PendingLookup], given its PendingKvLookupHandle.

Returns a HandleError if the handle is not associated with a pending lookup in the session.

Source

pub fn pending_kv_lookup( &self, handle: PendingKvLookupHandle, ) -> Result<&PendingKvLookupTask, HandleError>

Get a reference to a [PendingLookup], given its PendingKvLookupHandle.

Returns a HandleError if the handle is not associated with a lookup in the session.

Source

pub fn kv_list( &self, obj_store_key: ObjectStoreKey, cursor: Option<String>, prefix: Option<String>, limit: Option<u32>, ) -> Result<Vec<u8>, KvStoreError>

Source

pub fn insert_pending_kv_list( &mut self, pending: PendingKvListTask, ) -> PendingKvListHandle

Insert a [PendingList] into the session.

This method returns a new PendingKvListHandle, which can then be used to access and mutate the pending list.

Source

pub fn take_pending_kv_list( &mut self, handle: PendingKvListHandle, ) -> Result<PendingKvListTask, HandleError>

Take ownership of a [PendingList], given its PendingKvListHandle.

Returns a HandleError if the handle is not associated with a pending list in the session.

Source

pub fn pending_kv_list( &self, handle: PendingKvListHandle, ) -> Result<&PendingKvListTask, HandleError>

Get a reference to a [PendingList], given its PendingKvListHandle.

Returns a HandleError if the handle is not associated with a list in the session.

Source

pub fn secret_store_handle(&mut self, name: &str) -> Option<SecretStoreHandle>

Source

pub fn secret_store_name(&self, handle: SecretStoreHandle) -> Option<String>

Source

pub fn secret_handle( &mut self, store_name: &str, secret_name: &str, ) -> Option<SecretHandle>

Source

pub fn secret_lookup(&self, handle: SecretHandle) -> Option<SecretLookup>

Source

pub fn add_secret(&mut self, plaintext: Vec<u8>) -> SecretHandle

Source

pub fn secret_stores(&self) -> &SecretStores

Source

pub fn insert_pending_request( &mut self, pending: PeekableTask<Response<Body>>, ) -> PendingRequestHandle

Insert a [PendingRequest] into the session.

This method returns a new PendingRequestHandle, which can then be used to access and mutate the pending request.

Source

pub fn pending_request( &self, handle: PendingRequestHandle, ) -> Result<&PeekableTask<Response<Body>>, HandleError>

Get a reference to a [PendingRequest], given its PendingRequestHandle.

Returns a HandleError if the handle is not associated with a request in the session.

Source

pub fn pending_request_mut( &mut self, handle: PendingRequestHandle, ) -> Result<&mut PeekableTask<Response<Body>>, HandleError>

Get a mutable reference to a [PendingRequest], given its PendingRequestHandle.

Returns a HandleError if the handle is not associated with a request in the session.

Source

pub fn take_pending_request( &mut self, handle: PendingRequestHandle, ) -> Result<PeekableTask<Response<Body>>, HandleError>

Take ownership of a [PendingRequest], given its PendingRequestHandle.

Returns a HandleError if the handle is not associated with a pending request in the session.

Source

pub fn reinsert_pending_request( &mut self, handle: PendingRequestHandle, pending_req: PeekableTask<Response<Body>>, ) -> Result<(), HandleError>

Source

pub fn insert_cache_op(&mut self, task: PendingCacheTask) -> AsyncItemHandle

Insert a pending cache operation: CacheHandle or CacheBusyHandle

Source

pub fn cache(&self) -> &Arc<Cache>

Access the cache.

Source

pub fn prepare_select_targets( &mut self, handles: impl IntoIterator<Item = AsyncItemHandle>, ) -> Result<Vec<SelectTarget>, HandleError>

Take ownership of multiple AsyncItems in preparation for a select.

Returns a HandleError if any of the handles are not associated with a pending request in the session.

Source

pub fn reinsert_select_targets(&mut self, targets: Vec<SelectTarget>)

Put the given vector of select targets back into the pending request table, using the handles stored within each [SelectTarget].

Source

pub fn reinsert_async_handle( &mut self, handle: AsyncItemHandle, item: AsyncItem, )

Source

pub fn new_ready(&mut self) -> AsyncItemHandle

Source

pub fn session_id(&self) -> u64

Returns the unique identifier for the current session.

While this corresponds to the request ID for the initial request that spawned the session, subsequent downstream requests received by the session will have their own unique identifier. Care should be taken to not conflate the two, and to use Session::downstream_request_id whenever a request needs to be identified.

Source

pub fn config_path(&self) -> Option<&Path>

Access the path to the configuration file for this invocation.

Source

pub fn async_item_mut( &mut self, handle: AsyncItemHandle, ) -> Result<&mut AsyncItem, HandleError>

Source

pub fn take_async_item( &mut self, handle: AsyncItemHandle, ) -> Result<AsyncItem, HandleError>

Source

pub async fn select_impl( &mut self, handles: impl IntoIterator<Item = AsyncItemHandle>, ) -> Result<usize, Error>

Source

pub fn shielding_sites(&self) -> &ShieldingSites

Source

pub async fn register_pending_downstream_req( &mut self, timeout: Option<Duration>, ) -> Result<AsyncItemHandle, Error>

Source

pub fn take_pending_downstream_req( &mut self, handle: AsyncItemHandle, ) -> Result<PendingDownstreamReqTask, HandleError>

Source

pub async fn await_downstream_req( &mut self, handle: AsyncItemHandle, ) -> Result<Option<(RequestHandle, BodyHandle)>, Error>

Wait for a PendingDownstreamReqTask to finish, then fetch its request and body handles.

Source

pub fn abandon_pending_downstream_req( &mut self, handle: AsyncItemHandle, ) -> Result<(), HandleError>

Source

pub fn ctx(&self) -> &Arc<ExecuteCtx>

Trait Implementations§

Source§

impl FastlyAbi for Session

Source§

fn init( &mut self, _memory: &mut GuestMemory<'_>, abi_version: u64, ) -> Result<(), Error>

Source§

impl FastlyAcl for Session

Source§

fn open( &mut self, memory: &mut GuestMemory<'_>, acl_name: GuestPtr<str>, ) -> Result<AclHandle, Error>

Open a handle to an ACL by its linked name.

Source§

fn lookup<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, acl_handle: AclHandle, ip_octets: GuestPtr<u8>, ip_len: u32, body_handle_out: GuestPtr<BodyHandle>, acl_error_out: GuestPtr<AclError>, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Perform an ACL lookup operation using the given ACL handle.

There are two levels of errors returned by this function:

  • Error: These are general hostcall errors, e.g. handle not found.
  • AclError: There are ACL-specific errors, e.g. ‘no content’. It’s the callers responsibility to check both errors.
Source§

impl FastlyAsyncIo for Session

Source§

fn select<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, handles: GuestPtr<[AsyncItemHandle]>, timeout_ms: u32, ) -> Pin<Box<dyn Future<Output = Result<u32, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn is_ready( &mut self, _memory: &mut GuestMemory<'_>, handle: AsyncItemHandle, ) -> Result<u32, Error>

Source§

impl FastlyBackend for Session

Source§

fn exists( &mut self, memory: &mut GuestMemory<'_>, backend: GuestPtr<str>, ) -> Result<BackendExists, Error>

Source§

fn is_healthy( &mut self, memory: &mut GuestMemory<'_>, backend: GuestPtr<str>, ) -> Result<BackendHealth, Error>

Source§

fn is_dynamic( &mut self, memory: &mut GuestMemory<'_>, backend: GuestPtr<str>, ) -> Result<IsDynamic, Error>

Source§

fn get_host( &mut self, memory: &mut GuestMemory<'_>, backend: GuestPtr<str>, value: GuestPtr<u8>, value_max_len: u32, nwritten_out: GuestPtr<u32>, ) -> Result<(), Error>

Source§

fn get_override_host( &mut self, memory: &mut GuestMemory<'_>, backend: GuestPtr<str>, value: GuestPtr<u8>, value_max_len: u32, nwritten_out: GuestPtr<u32>, ) -> Result<(), Error>

Source§

fn get_port( &mut self, memory: &mut GuestMemory<'_>, backend: GuestPtr<str>, ) -> Result<Port, Error>

Source§

fn get_connect_timeout_ms( &mut self, memory: &mut GuestMemory<'_>, backend: GuestPtr<str>, ) -> Result<TimeoutMs, Error>

Source§

fn get_first_byte_timeout_ms( &mut self, memory: &mut GuestMemory<'_>, backend: GuestPtr<str>, ) -> Result<TimeoutMs, Error>

Source§

fn get_between_bytes_timeout_ms( &mut self, memory: &mut GuestMemory<'_>, backend: GuestPtr<str>, ) -> Result<TimeoutMs, Error>

Source§

fn get_ssl_min_version( &mut self, memory: &mut GuestMemory<'_>, backend: GuestPtr<str>, ) -> Result<TlsVersion, Error>

Source§

fn get_ssl_max_version( &mut self, memory: &mut GuestMemory<'_>, backend: GuestPtr<str>, ) -> Result<TlsVersion, Error>

Source§

fn get_http_keepalive_time( &mut self, memory: &mut GuestMemory<'_>, backend: GuestPtr<str>, ) -> Result<u32, Error>

Source§

fn get_tcp_keepalive_enable( &mut self, memory: &mut GuestMemory<'_>, backend: GuestPtr<str>, ) -> Result<u32, Error>

Source§

fn get_tcp_keepalive_interval( &mut self, memory: &mut GuestMemory<'_>, backend: GuestPtr<str>, ) -> Result<u32, Error>

Source§

fn get_tcp_keepalive_probes( &mut self, memory: &mut GuestMemory<'_>, backend: GuestPtr<str>, ) -> Result<u32, Error>

Source§

fn get_tcp_keepalive_time( &mut self, memory: &mut GuestMemory<'_>, backend: GuestPtr<str>, ) -> Result<u32, Error>

Source§

fn is_ssl( &mut self, memory: &mut GuestMemory<'_>, backend: GuestPtr<str>, ) -> Result<IsSsl, Error>

Source§

impl FastlyCache for Session

Source§

fn lookup<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, cache_key: GuestPtr<[u8]>, options_mask: CacheLookupOptionsMask, options: GuestPtr<CacheLookupOptions>, ) -> Pin<Box<dyn Future<Output = Result<CacheHandle, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn insert<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, cache_key: GuestPtr<[u8]>, options_mask: CacheWriteOptionsMask, options: GuestPtr<CacheWriteOptions>, ) -> Pin<Box<dyn Future<Output = Result<BodyHandle, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn replace<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, cache_key: GuestPtr<[u8]>, options_mask: CacheReplaceOptionsMask, abi_options: GuestPtr<CacheReplaceOptions>, ) -> Pin<Box<dyn Future<Output = Result<CacheReplaceHandle, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn replace_get_age_ns<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, cache_handle: CacheReplaceHandle, ) -> Pin<Box<dyn Future<Output = Result<CacheDurationNs, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn replace_get_body<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, cache_handle: CacheReplaceHandle, options_mask: CacheGetBodyOptionsMask, options: &'life3 CacheGetBodyOptions, ) -> Pin<Box<dyn Future<Output = Result<BodyHandle, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Source§

fn replace_get_hits<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, cache_handle: CacheReplaceHandle, ) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn replace_get_length<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, cache_handle: CacheReplaceHandle, ) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn replace_get_max_age_ns<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, cache_handle: CacheReplaceHandle, ) -> Pin<Box<dyn Future<Output = Result<CacheDurationNs, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn replace_get_stale_while_revalidate_ns<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, cache_handle: CacheReplaceHandle, ) -> Pin<Box<dyn Future<Output = Result<CacheDurationNs, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn replace_get_state<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, cache_handle: CacheReplaceHandle, ) -> Pin<Box<dyn Future<Output = Result<CacheLookupState, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn replace_get_user_metadata<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, cache_handle: CacheReplaceHandle, out_ptr: GuestPtr<u8>, 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,

Source§

fn replace_insert<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, cache_handle: CacheReplaceHandle, options_mask: CacheWriteOptionsMask, abi_options: GuestPtr<CacheWriteOptions>, ) -> Pin<Box<dyn Future<Output = Result<BodyHandle, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn transaction_lookup<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, cache_key: GuestPtr<[u8]>, options_mask: CacheLookupOptionsMask, options: GuestPtr<CacheLookupOptions>, ) -> Pin<Box<dyn Future<Output = Result<CacheHandle, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn transaction_lookup_async<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, cache_key: GuestPtr<[u8]>, options_mask: CacheLookupOptionsMask, options: GuestPtr<CacheLookupOptions>, ) -> Pin<Box<dyn Future<Output = Result<CacheBusyHandle, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn cache_busy_handle_wait<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, handle: CacheBusyHandle, ) -> Pin<Box<dyn Future<Output = Result<CacheHandle, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn transaction_insert<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, handle: CacheHandle, options_mask: CacheWriteOptionsMask, options: GuestPtr<CacheWriteOptions>, ) -> Pin<Box<dyn Future<Output = Result<BodyHandle, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn transaction_insert_and_stream_back<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, handle: CacheHandle, options_mask: CacheWriteOptionsMask, options: GuestPtr<CacheWriteOptions>, ) -> Pin<Box<dyn Future<Output = Result<(BodyHandle, CacheHandle), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn transaction_update<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, handle: CacheHandle, options_mask: CacheWriteOptionsMask, options: GuestPtr<CacheWriteOptions>, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn transaction_cancel<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, handle: CacheHandle, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn close_busy<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, handle: CacheBusyHandle, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn close<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, handle: CacheHandle, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn get_state<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, handle: CacheHandle, ) -> Pin<Box<dyn Future<Output = Result<CacheLookupState, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn get_user_metadata<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, handle: CacheHandle, user_metadata_out_ptr: GuestPtr<u8>, user_metadata_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,

Source§

fn get_body<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, handle: CacheHandle, options_mask: CacheGetBodyOptionsMask, options: &'life3 CacheGetBodyOptions, ) -> Pin<Box<dyn Future<Output = Result<BodyHandle, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Source§

fn get_length<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, handle: CacheHandle, ) -> Pin<Box<dyn Future<Output = Result<CacheObjectLength, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn get_max_age_ns<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, handle: CacheHandle, ) -> Pin<Box<dyn Future<Output = Result<CacheDurationNs, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn get_stale_while_revalidate_ns<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, handle: CacheHandle, ) -> Pin<Box<dyn Future<Output = Result<CacheDurationNs, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn get_age_ns<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, handle: CacheHandle, ) -> Pin<Box<dyn Future<Output = Result<CacheDurationNs, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn get_hits<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, handle: CacheHandle, ) -> Pin<Box<dyn Future<Output = Result<CacheHitCount, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

impl FastlyComputeRuntime for Session

Source§

fn get_vcpu_ms(&mut self, _memory: &mut GuestMemory<'_>) -> Result<u64, Error>

Source§

impl FastlyConfigStore for Session

Source§

fn open( &mut self, memory: &mut GuestMemory<'_>, name: GuestPtr<str>, ) -> Result<ConfigStoreHandle, Error>

Source§

fn get( &mut self, memory: &mut GuestMemory<'_>, config_store: ConfigStoreHandle, key: GuestPtr<str>, buf: GuestPtr<u8>, buf_len: u32, nwritten_out: GuestPtr<u32>, ) -> Result<(), Error>

Source§

impl FastlyDeviceDetection for Session

Source§

fn lookup( &mut self, memory: &mut GuestMemory<'_>, user_agent: GuestPtr<str>, buf: GuestPtr<u8>, buf_len: u32, nwritten_out: GuestPtr<u32>, ) -> Result<(), Error>

Source§

impl FastlyDictionary for Session

Source§

fn open( &mut self, memory: &mut GuestMemory<'_>, name: GuestPtr<str>, ) -> Result<DictionaryHandle, Error>

Source§

fn get( &mut self, memory: &mut GuestMemory<'_>, dictionary: DictionaryHandle, key: GuestPtr<str>, buf: GuestPtr<u8>, buf_len: u32, nwritten_out: GuestPtr<u32>, ) -> Result<(), Error>

Source§

impl FastlyErl for Session

Source§

fn check_rate( &mut self, _memory: &mut GuestMemory<'_>, _rc: GuestPtr<str>, _entry: GuestPtr<str>, _delta: u32, _window: u32, _limit: u32, _pb: GuestPtr<str>, _ttl: u32, ) -> Result<u32, Error>

Source§

fn ratecounter_increment( &mut self, _memory: &mut GuestMemory<'_>, _rc: GuestPtr<str>, _entry: GuestPtr<str>, _delta: u32, ) -> Result<(), Error>

Source§

fn ratecounter_lookup_rate( &mut self, _memory: &mut GuestMemory<'_>, _rc: GuestPtr<str>, _entry: GuestPtr<str>, _window: u32, ) -> Result<u32, Error>

Source§

fn ratecounter_lookup_count( &mut self, _memory: &mut GuestMemory<'_>, _rc: GuestPtr<str>, _entry: GuestPtr<str>, _duration: u32, ) -> Result<u32, Error>

Source§

fn penaltybox_add( &mut self, _memory: &mut GuestMemory<'_>, _pb: GuestPtr<str>, _entry: GuestPtr<str>, _ttl: u32, ) -> Result<(), Error>

Source§

fn penaltybox_has( &mut self, _memory: &mut GuestMemory<'_>, _pb: GuestPtr<str>, _entry: GuestPtr<str>, ) -> Result<u32, Error>

Source§

impl FastlyGeo for Session

Source§

fn lookup( &mut self, memory: &mut GuestMemory<'_>, addr_octets: GuestPtr<u8>, addr_len: u32, buf: GuestPtr<u8>, buf_len: u32, nwritten_out: GuestPtr<u32>, ) -> Result<(), Error>

Source§

impl FastlyHttpBody for Session

Source§

fn append<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, _memory: &'life1 mut GuestMemory<'life2>, dest: BodyHandle, src: BodyHandle, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn new(&mut self, _memory: &mut GuestMemory<'_>) -> Result<BodyHandle, Error>

Source§

fn read<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, body_handle: BodyHandle, buf: GuestPtr<u8>, buf_len: u32, ) -> Pin<Box<dyn Future<Output = Result<u32, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn write<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, body_handle: BodyHandle, buf: GuestPtr<[u8]>, end: BodyWriteEnd, ) -> Pin<Box<dyn Future<Output = Result<u32, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn close( &mut self, _memory: &mut GuestMemory<'_>, body_handle: BodyHandle, ) -> Result<(), Error>

Source§

fn abandon( &mut self, _memory: &mut GuestMemory<'_>, body_handle: BodyHandle, ) -> Result<(), Error>

Source§

fn trailer_append( &mut self, memory: &mut GuestMemory<'_>, body_handle: BodyHandle, name: GuestPtr<[u8]>, value: GuestPtr<[u8]>, ) -> Result<(), Error>

Source§

fn trailer_names_get<'a>( &mut self, memory: &mut GuestMemory<'_>, body_handle: BodyHandle, buf: GuestPtr<u8>, buf_len: u32, cursor: MultiValueCursor, ending_cursor_out: GuestPtr<MultiValueCursorResult>, nwritten_out: GuestPtr<u32>, ) -> Result<(), Error>

Source§

fn trailer_value_get<'a>( &mut self, memory: &mut GuestMemory<'_>, body_handle: BodyHandle, name: GuestPtr<[u8]>, value: GuestPtr<u8>, value_max_len: u32, nwritten_out: GuestPtr<u32>, ) -> Result<(), Error>

Source§

fn trailer_values_get<'a>( &mut self, memory: &mut GuestMemory<'_>, body_handle: BodyHandle, name: GuestPtr<[u8]>, buf: GuestPtr<u8>, buf_len: u32, cursor: MultiValueCursor, ending_cursor_out: GuestPtr<MultiValueCursorResult>, nwritten_out: GuestPtr<u32>, ) -> Result<(), Error>

Source§

fn known_length( &mut self, _memory: &mut GuestMemory<'_>, body_handle: BodyHandle, ) -> Result<BodyLength, Error>

Source§

impl FastlyHttpCache for Session

Source§

fn lookup<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, request: 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,

Source§

fn transaction_lookup<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, request: 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,

Source§

fn transaction_insert<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, cache_handle: HttpCacheHandle, response_handle: ResponseHandle, options_mask: HttpCacheWriteOptionsMask, abi_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,

Source§

fn transaction_insert_and_stream_back<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, cache_handle: HttpCacheHandle, response_handle: ResponseHandle, options_mask: HttpCacheWriteOptionsMask, abi_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,

Source§

fn transaction_update<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, cache_handle: HttpCacheHandle, response_handle: ResponseHandle, options_mask: HttpCacheWriteOptionsMask, abi_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,

Source§

fn transaction_update_and_return_fresh<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, cache_handle: HttpCacheHandle, response_handle: ResponseHandle, options_mask: HttpCacheWriteOptionsMask, abi_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,

Source§

fn transaction_record_not_cacheable<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, cache_handle: HttpCacheHandle, options_mask: HttpCacheWriteOptionsMask, abi_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,

Source§

fn transaction_abandon<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, _memory: &'life1 mut GuestMemory<'life2>, cache_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,

Source§

fn close<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, _memory: &'life1 mut GuestMemory<'life2>, cache_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,

Source§

fn is_request_cacheable( &mut self, _memory: &mut GuestMemory<'_>, request_handle: RequestHandle, ) -> Result<u32, Error>

Source§

fn get_suggested_cache_key( &mut self, memory: &mut GuestMemory<'_>, request_handle: RequestHandle, key_out_ptr: GuestPtr<u8>, key_out_len: u32, nwritten_out: GuestPtr<u32>, ) -> Result<(), Error>

Source§

fn get_suggested_backend_request<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, _memory: &'life1 mut GuestMemory<'life2>, cache_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,

Source§

fn get_suggested_cache_options<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, cache_handle: HttpCacheHandle, response_handle: ResponseHandle, options_wanted: HttpCacheWriteOptionsMask, pointers: GuestPtr<HttpCacheWriteOptions>, pointer_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,

Source§

fn prepare_response_for_storage<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, _memory: &'life1 mut GuestMemory<'life2>, cache_handle: HttpCacheHandle, response_handle: 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,

Source§

fn get_found_response<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, _memory: &'life1 mut GuestMemory<'life2>, cache_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,

Source§

fn get_state<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, _memory: &'life1 mut GuestMemory<'life2>, cache_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,

Source§

fn get_length<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, _memory: &'life1 mut GuestMemory<'life2>, cache_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,

Source§

fn get_max_age_ns<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, _memory: &'life1 mut GuestMemory<'life2>, cache_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,

Source§

fn get_stale_while_revalidate_ns<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, _memory: &'life1 mut GuestMemory<'life2>, cache_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,

Source§

fn get_age_ns<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, _memory: &'life1 mut GuestMemory<'life2>, cache_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,

Source§

fn get_hits<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, _memory: &'life1 mut GuestMemory<'life2>, cache_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,

Source§

fn get_sensitive_data<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, _memory: &'life1 mut GuestMemory<'life2>, cache_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,

Source§

fn get_surrogate_keys<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, cache_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,

Source§

fn get_vary_rule<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, cache_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,

Source§

impl FastlyHttpDownstream for Session

Source§

fn next_request<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, options_mask: NextRequestOptionsMask, options: GuestPtr<NextRequestOptions>, ) -> Pin<Box<dyn Future<Output = Result<RequestPromiseHandle, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn next_request_abandon<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, _memory: &'life1 mut GuestMemory<'life2>, handle: RequestPromiseHandle, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn next_request_wait<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, _memory: &'life1 mut GuestMemory<'life2>, handle: RequestPromiseHandle, ) -> Pin<Box<dyn Future<Output = Result<(RequestHandle, BodyHandle), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn downstream_original_header_names( &mut self, memory: &mut GuestMemory<'_>, handle: RequestHandle, buf: GuestPtr<u8>, buf_len: u32, cursor: MultiValueCursor, ending_cursor_out: GuestPtr<MultiValueCursorResult>, nwritten_out: GuestPtr<u32>, ) -> Result<(), Error>

Source§

fn downstream_original_header_count( &mut self, _memory: &mut GuestMemory<'_>, handle: RequestHandle, ) -> Result<u32, Error>

Source§

fn downstream_server_ip_addr( &mut self, memory: &mut GuestMemory<'_>, handle: RequestHandle, addr_octets_ptr: GuestPtr<u8>, ) -> Result<u32, Error>

Source§

fn downstream_client_ip_addr( &mut self, memory: &mut GuestMemory<'_>, handle: RequestHandle, addr_octets_ptr: GuestPtr<u8>, ) -> Result<u32, Error>

Source§

fn downstream_client_h2_fingerprint( &mut self, _memory: &mut GuestMemory<'_>, handle: RequestHandle, _h2fp_out: GuestPtr<u8>, _h2fp_max_len: u32, _nwritten_out: GuestPtr<u32>, ) -> Result<(), Error>

Source§

fn downstream_client_request_id( &mut self, memory: &mut GuestMemory<'_>, handle: RequestHandle, reqid_out: GuestPtr<u8>, reqid_max_len: u32, nwritten_out: GuestPtr<u32>, ) -> Result<(), Error>

Source§

fn downstream_client_oh_fingerprint( &mut self, _memory: &mut GuestMemory<'_>, handle: RequestHandle, _ohfp_out: GuestPtr<u8>, _ohfp_max_len: u32, _nwritten_out: GuestPtr<u32>, ) -> Result<(), Error>

Source§

fn downstream_client_ddos_detected( &mut self, _memory: &mut GuestMemory<'_>, _handle: RequestHandle, ) -> Result<u32, Error>

Source§

fn downstream_tls_cipher_openssl_name( &mut self, _memory: &mut GuestMemory<'_>, handle: RequestHandle, _cipher_out: GuestPtr<u8>, _cipher_max_len: u32, _nwritten_out: GuestPtr<u32>, ) -> Result<(), Error>

Source§

fn downstream_tls_protocol( &mut self, _memory: &mut GuestMemory<'_>, handle: RequestHandle, _protocol_out: GuestPtr<u8>, _protocol_max_len: u32, _nwritten_out: GuestPtr<u32>, ) -> Result<(), Error>

Source§

fn downstream_tls_client_servername( &mut self, _memory: &mut GuestMemory<'_>, handle: RequestHandle, _sni_out: GuestPtr<u8>, _sni_max_len: u32, _nwritten_out: GuestPtr<u32>, ) -> Result<(), Error>

Source§

fn downstream_tls_client_hello( &mut self, _memory: &mut GuestMemory<'_>, handle: RequestHandle, _chello_out: GuestPtr<u8>, _chello_max_len: u32, _nwritten_out: GuestPtr<u32>, ) -> Result<(), Error>

Source§

fn downstream_tls_raw_client_certificate( &mut self, _memory: &mut GuestMemory<'_>, handle: RequestHandle, _cert_out: GuestPtr<u8>, _cert_max_len: u32, _nwritten_out: GuestPtr<u32>, ) -> Result<(), Error>

Source§

fn downstream_tls_client_cert_verify_result( &mut self, _memory: &mut GuestMemory<'_>, handle: RequestHandle, ) -> Result<ClientCertVerifyResult, Error>

Source§

fn downstream_tls_ja3_md5( &mut self, _memory: &mut GuestMemory<'_>, handle: RequestHandle, _ja3_md5_out: GuestPtr<u8>, ) -> Result<u32, Error>

Source§

fn downstream_tls_ja4( &mut self, _memory: &mut GuestMemory<'_>, handle: RequestHandle, _ja4_out: GuestPtr<u8>, _ja4_max_len: u32, _nwritten_out: GuestPtr<u32>, ) -> Result<(), Error>

Source§

fn downstream_compliance_region( &mut self, memory: &mut GuestMemory<'_>, handle: RequestHandle, region_out: GuestPtr<u8>, region_max_len: u32, nwritten_out: GuestPtr<u32>, ) -> Result<(), Error>

Source§

fn fastly_key_is_valid( &mut self, _memory: &mut GuestMemory<'_>, _handle: RequestHandle, ) -> Result<u32, Error>

Source§

impl FastlyHttpReq for Session

Source§

fn body_downstream_get( &mut self, _memory: &mut GuestMemory<'_>, ) -> Result<(RequestHandle, BodyHandle), Error>

Source§

fn cache_override_set( &mut self, _memory: &mut GuestMemory<'_>, req_handle: RequestHandle, tag: CacheOverrideTag, ttl: u32, stale_while_revalidate: u32, ) -> Result<(), Error>

Source§

fn cache_override_v2_set( &mut self, memory: &mut GuestMemory<'_>, req_handle: RequestHandle, tag: CacheOverrideTag, ttl: u32, stale_while_revalidate: u32, sk: GuestPtr<[u8]>, ) -> Result<(), Error>

Source§

fn downstream_server_ip_addr( &mut self, memory: &mut GuestMemory<'_>, addr_octets_ptr: GuestPtr<u8>, ) -> Result<u32, Error>

Source§

fn downstream_client_ip_addr( &mut self, memory: &mut GuestMemory<'_>, addr_octets_ptr: GuestPtr<u8>, ) -> Result<u32, Error>

Source§

fn downstream_client_h2_fingerprint( &mut self, memory: &mut GuestMemory<'_>, h2fp_out: GuestPtr<u8>, h2fp_max_len: u32, nwritten_out: GuestPtr<u32>, ) -> Result<(), Error>

Source§

fn downstream_client_request_id( &mut self, memory: &mut GuestMemory<'_>, reqid_out: GuestPtr<u8>, reqid_max_len: u32, nwritten_out: GuestPtr<u32>, ) -> Result<(), Error>

Source§

fn downstream_client_oh_fingerprint( &mut self, memory: &mut GuestMemory<'_>, ohfp_out: GuestPtr<u8>, ohfp_max_len: u32, nwritten_out: GuestPtr<u32>, ) -> Result<(), Error>

Source§

fn downstream_client_ddos_detected( &mut self, memory: &mut GuestMemory<'_>, ) -> Result<u32, Error>

Source§

fn downstream_tls_cipher_openssl_name( &mut self, memory: &mut GuestMemory<'_>, cipher_out: GuestPtr<u8>, cipher_max_len: u32, nwritten_out: GuestPtr<u32>, ) -> Result<(), Error>

Source§

fn upgrade_websocket( &mut self, memory: &mut GuestMemory<'_>, backend_name: GuestPtr<str>, ) -> Result<(), Error>

Source§

fn redirect_to_websocket_proxy( &mut self, memory: &mut GuestMemory<'_>, backend_name: GuestPtr<str>, ) -> Result<(), Error>

Source§

fn redirect_to_grip_proxy( &mut self, memory: &mut GuestMemory<'_>, backend_name: GuestPtr<str>, ) -> Result<(), Error>

Source§

fn redirect_to_websocket_proxy_v2( &mut self, _memory: &mut GuestMemory<'_>, _req_handle: RequestHandle, _backend: GuestPtr<str>, ) -> Result<(), Error>

Source§

fn redirect_to_grip_proxy_v2( &mut self, memory: &mut GuestMemory<'_>, req_handle: RequestHandle, backend_name: GuestPtr<str>, ) -> Result<(), Error>

Source§

fn downstream_tls_protocol( &mut self, memory: &mut GuestMemory<'_>, protocol_out: GuestPtr<u8>, protocol_max_len: u32, nwritten_out: GuestPtr<u32>, ) -> Result<(), Error>

Source§

fn downstream_tls_client_hello( &mut self, memory: &mut GuestMemory<'_>, chello_out: GuestPtr<u8>, chello_max_len: u32, nwritten_out: GuestPtr<u32>, ) -> Result<(), Error>

Source§

fn downstream_tls_raw_client_certificate( &mut self, memory: &mut GuestMemory<'_>, cert_out: GuestPtr<u8>, cert_max_len: u32, nwritten_out: GuestPtr<u32>, ) -> Result<(), Error>

Source§

fn downstream_tls_client_cert_verify_result( &mut self, memory: &mut GuestMemory<'_>, ) -> Result<ClientCertVerifyResult, Error>

Source§

fn downstream_tls_ja3_md5( &mut self, memory: &mut GuestMemory<'_>, ja3_md5_out: GuestPtr<u8>, ) -> Result<u32, Error>

Source§

fn downstream_tls_ja4( &mut self, memory: &mut GuestMemory<'_>, ja4_out: GuestPtr<u8>, ja4_max_len: u32, nwritten_out: GuestPtr<u32>, ) -> Result<(), Error>

Source§

fn downstream_compliance_region( &mut self, memory: &mut GuestMemory<'_>, region_out: GuestPtr<u8>, region_max_len: u32, nwritten_out: GuestPtr<u32>, ) -> Result<(), Error>

Source§

fn framing_headers_mode_set( &mut self, _memory: &mut GuestMemory<'_>, req_handle: RequestHandle, mode: FramingHeadersMode, ) -> Result<(), Error>

Source§

fn register_dynamic_backend( &mut self, memory: &mut GuestMemory<'_>, name: GuestPtr<str>, upstream_dynamic: GuestPtr<str>, backend_info_mask: BackendConfigOptions, backend_info: GuestPtr<DynamicBackendConfig>, ) -> Result<(), Error>

Source§

fn new(&mut self, _memory: &mut GuestMemory<'_>) -> Result<RequestHandle, Error>

Source§

fn header_names_get( &mut self, memory: &mut GuestMemory<'_>, req_handle: RequestHandle, buf: GuestPtr<u8>, buf_len: u32, cursor: MultiValueCursor, ending_cursor_out: GuestPtr<MultiValueCursorResult>, nwritten_out: GuestPtr<u32>, ) -> Result<(), Error>

Source§

fn original_header_names_get( &mut self, memory: &mut GuestMemory<'_>, buf: GuestPtr<u8>, buf_len: u32, cursor: MultiValueCursor, ending_cursor_out: GuestPtr<MultiValueCursorResult>, nwritten_out: GuestPtr<u32>, ) -> Result<(), Error>

Source§

fn original_header_count( &mut self, memory: &mut GuestMemory<'_>, ) -> Result<u32, Error>

Source§

fn header_value_get( &mut self, memory: &mut GuestMemory<'_>, req_handle: RequestHandle, name: GuestPtr<[u8]>, value: GuestPtr<u8>, value_max_len: u32, nwritten_out: GuestPtr<u32>, ) -> Result<(), Error>

Source§

fn header_values_get( &mut self, memory: &mut GuestMemory<'_>, req_handle: RequestHandle, name: GuestPtr<[u8]>, buf: GuestPtr<u8>, buf_len: u32, cursor: MultiValueCursor, ending_cursor_out: GuestPtr<MultiValueCursorResult>, nwritten_out: GuestPtr<u32>, ) -> Result<(), Error>

Source§

fn header_values_set( &mut self, memory: &mut GuestMemory<'_>, req_handle: RequestHandle, name: GuestPtr<[u8]>, values: GuestPtr<[u8]>, ) -> Result<(), Error>

Source§

fn header_insert( &mut self, memory: &mut GuestMemory<'_>, req_handle: RequestHandle, name: GuestPtr<[u8]>, value: GuestPtr<[u8]>, ) -> Result<(), Error>

Source§

fn header_append( &mut self, memory: &mut GuestMemory<'_>, req_handle: RequestHandle, name: GuestPtr<[u8]>, value: GuestPtr<[u8]>, ) -> Result<(), Error>

Source§

fn header_remove( &mut self, memory: &mut GuestMemory<'_>, req_handle: RequestHandle, name: GuestPtr<[u8]>, ) -> Result<(), Error>

Source§

fn method_get( &mut self, memory: &mut GuestMemory<'_>, req_handle: RequestHandle, buf: GuestPtr<u8>, buf_len: u32, nwritten_out: GuestPtr<u32>, ) -> Result<(), Error>

Source§

fn method_set( &mut self, memory: &mut GuestMemory<'_>, req_handle: RequestHandle, method: GuestPtr<str>, ) -> Result<(), Error>

Source§

fn uri_get( &mut self, memory: &mut GuestMemory<'_>, req_handle: RequestHandle, buf: GuestPtr<u8>, buf_len: u32, nwritten_out: GuestPtr<u32>, ) -> Result<(), Error>

Source§

fn uri_set( &mut self, memory: &mut GuestMemory<'_>, req_handle: RequestHandle, uri: GuestPtr<str>, ) -> Result<(), Error>

Source§

fn version_get( &mut self, _memory: &mut GuestMemory<'_>, req_handle: RequestHandle, ) -> Result<HttpVersion, Error>

Source§

fn version_set( &mut self, _memory: &mut GuestMemory<'_>, req_handle: RequestHandle, version: HttpVersion, ) -> Result<(), Error>

Source§

fn send<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, req_handle: RequestHandle, body_handle: BodyHandle, backend_bytes: GuestPtr<str>, ) -> 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,

Source§

fn send_v2<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, req_handle: RequestHandle, body_handle: BodyHandle, backend_bytes: GuestPtr<str>, _error_detail: GuestPtr<SendErrorDetail>, ) -> 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,

Source§

fn send_v3<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, req_handle: RequestHandle, body_handle: BodyHandle, backend_bytes: GuestPtr<str>, error_detail: GuestPtr<SendErrorDetail>, ) -> 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,

Source§

fn send_async<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, req_handle: RequestHandle, body_handle: BodyHandle, backend_bytes: GuestPtr<str>, ) -> Pin<Box<dyn Future<Output = Result<PendingRequestHandle, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn send_async_v2<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, req_handle: RequestHandle, body_handle: BodyHandle, backend_bytes: GuestPtr<str>, streaming: u32, ) -> Pin<Box<dyn Future<Output = Result<PendingRequestHandle, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn send_async_streaming<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, req_handle: RequestHandle, body_handle: BodyHandle, backend_bytes: GuestPtr<str>, ) -> Pin<Box<dyn Future<Output = Result<PendingRequestHandle, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn pending_req_poll<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, _memory: &'life1 mut GuestMemory<'life2>, pending_req_handle: PendingRequestHandle, ) -> Pin<Box<dyn Future<Output = Result<(u32, ResponseHandle, BodyHandle), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn pending_req_poll_v2<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, pending_req_handle: PendingRequestHandle, _error_detail: GuestPtr<SendErrorDetail>, ) -> Pin<Box<dyn Future<Output = Result<(u32, ResponseHandle, BodyHandle), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn pending_req_wait<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, _memory: &'life1 mut GuestMemory<'life2>, pending_req_handle: PendingRequestHandle, ) -> 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,

Source§

fn pending_req_wait_v2<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, pending_req_handle: PendingRequestHandle, _error_detail: GuestPtr<SendErrorDetail>, ) -> 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,

Source§

fn pending_req_select<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, pending_req_handles: GuestPtr<[PendingRequestHandle]>, ) -> Pin<Box<dyn Future<Output = Result<(u32, ResponseHandle, BodyHandle), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn pending_req_select_v2<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, pending_req_handles: GuestPtr<[PendingRequestHandle]>, _error_detail: GuestPtr<SendErrorDetail>, ) -> Pin<Box<dyn Future<Output = Result<(u32, ResponseHandle, BodyHandle), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn fastly_key_is_valid( &mut self, memory: &mut GuestMemory<'_>, ) -> Result<u32, Error>

Source§

fn close( &mut self, _memory: &mut GuestMemory<'_>, req_handle: RequestHandle, ) -> Result<(), Error>

Source§

fn auto_decompress_response_set( &mut self, _memory: &mut GuestMemory<'_>, req_handle: RequestHandle, encodings: ContentEncodings, ) -> Result<(), Error>

Source§

fn inspect( &mut self, memory: &mut GuestMemory<'_>, ds_req: RequestHandle, ds_body: BodyHandle, info_mask: InspectInfoMask, info: GuestPtr<InspectInfo>, buf: GuestPtr<u8>, buf_len: u32, ) -> Result<u32, Error>

Source§

fn on_behalf_of( &mut self, _memory: &mut GuestMemory<'_>, _ds_req: RequestHandle, _service: GuestPtr<str>, ) -> Result<(), Error>

Source§

impl FastlyHttpResp for Session

Source§

fn new( &mut self, _memory: &mut GuestMemory<'_>, ) -> Result<ResponseHandle, Error>

Source§

fn header_names_get( &mut self, memory: &mut GuestMemory<'_>, resp_handle: ResponseHandle, buf: GuestPtr<u8>, buf_len: u32, cursor: MultiValueCursor, ending_cursor_out: GuestPtr<MultiValueCursorResult>, nwritten_out: GuestPtr<u32>, ) -> Result<(), Error>

Source§

fn header_value_get( &mut self, memory: &mut GuestMemory<'_>, resp_handle: ResponseHandle, name: GuestPtr<[u8]>, value: GuestPtr<u8>, value_max_len: u32, nwritten_out: GuestPtr<u32>, ) -> Result<(), Error>

Source§

fn header_values_get( &mut self, memory: &mut GuestMemory<'_>, resp_handle: ResponseHandle, name: GuestPtr<[u8]>, buf: GuestPtr<u8>, buf_len: u32, cursor: MultiValueCursor, ending_cursor_out: GuestPtr<MultiValueCursorResult>, nwritten_out: GuestPtr<u32>, ) -> Result<(), Error>

Source§

fn header_values_set( &mut self, memory: &mut GuestMemory<'_>, resp_handle: ResponseHandle, name: GuestPtr<[u8]>, values: GuestPtr<[u8]>, ) -> Result<(), Error>

Source§

fn header_insert( &mut self, memory: &mut GuestMemory<'_>, resp_handle: ResponseHandle, name: GuestPtr<[u8]>, value: GuestPtr<[u8]>, ) -> Result<(), Error>

Source§

fn header_append<'a>( &mut self, memory: &mut GuestMemory<'_>, resp_handle: ResponseHandle, name: GuestPtr<[u8]>, value: GuestPtr<[u8]>, ) -> Result<(), Error>

Source§

fn header_remove<'a>( &mut self, memory: &mut GuestMemory<'_>, resp_handle: ResponseHandle, name: GuestPtr<[u8]>, ) -> Result<(), Error>

Source§

fn version_get( &mut self, _memory: &mut GuestMemory<'_>, resp_handle: ResponseHandle, ) -> Result<HttpVersion, Error>

Source§

fn version_set( &mut self, _memory: &mut GuestMemory<'_>, resp_handle: ResponseHandle, version: HttpVersion, ) -> Result<(), Error>

Source§

fn send_downstream( &mut self, _memory: &mut GuestMemory<'_>, resp_handle: ResponseHandle, body_handle: BodyHandle, streaming: u32, ) -> Result<(), Error>

Source§

fn status_get( &mut self, _memory: &mut GuestMemory<'_>, resp_handle: ResponseHandle, ) -> Result<HttpStatus, Error>

Source§

fn status_set( &mut self, _memory: &mut GuestMemory<'_>, resp_handle: ResponseHandle, status: HttpStatus, ) -> Result<(), Error>

Source§

fn framing_headers_mode_set( &mut self, _memory: &mut GuestMemory<'_>, resp_handle: ResponseHandle, mode: FramingHeadersMode, ) -> Result<(), Error>

Source§

fn close( &mut self, _memory: &mut GuestMemory<'_>, resp_handle: ResponseHandle, ) -> Result<(), Error>

Source§

fn http_keepalive_mode_set( &mut self, _memory: &mut GuestMemory<'_>, _h: ResponseHandle, mode: HttpKeepaliveMode, ) -> Result<(), Error>

Source§

fn get_addr_dest_ip( &mut self, memory: &mut GuestMemory<'_>, resp_handle: ResponseHandle, addr_octets_ptr: GuestPtr<u8>, ) -> Result<u32, Error>

Source§

fn get_addr_dest_port( &mut self, _memory: &mut GuestMemory<'_>, resp_handle: ResponseHandle, ) -> Result<u16, Error>

Source§

impl FastlyImageOptimizer for Session

Source§

fn transform_image_optimizer_request<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, _memory: &'life1 mut GuestMemory<'life2>, _origin_image_request: RequestHandle, _origin_image_request_body: BodyHandle, _origin_image_request_backend: GuestPtr<str>, _io_transform_config_mask: ImageOptimizerTransformConfigOptions, _io_transform_config: GuestPtr<ImageOptimizerTransformConfig>, _io_error_detail: GuestPtr<ImageOptimizerErrorDetail>, ) -> 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,

Source§

impl FastlyKvStore for Session

Source§

fn open( &mut self, memory: &mut GuestMemory<'_>, name: GuestPtr<str>, ) -> Result<KvStoreHandle, Error>

Source§

fn lookup<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, store: KvStoreHandle, key: GuestPtr<str>, _lookup_config_mask: KvLookupConfigOptions, _lookup_configuration: GuestPtr<KvLookupConfig>, handle_out: GuestPtr<KvStoreLookupHandle>, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn lookup_wait<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, pending_kv_lookup_handle: KvStoreLookupHandle, body_handle_out: GuestPtr<BodyHandle>, metadata_buf: GuestPtr<u8>, metadata_buf_len: u32, nwritten_out: GuestPtr<u32>, generation_out: GuestPtr<u32>, kv_error_out: GuestPtr<KvError>, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn lookup_wait_v2<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, pending_kv_lookup_handle: KvStoreLookupHandle, body_handle_out: GuestPtr<BodyHandle>, metadata_buf: GuestPtr<u8>, metadata_buf_len: u32, nwritten_out: GuestPtr<u32>, generation_out: GuestPtr<u64>, kv_error_out: GuestPtr<KvError>, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn insert<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, store: KvStoreHandle, key: GuestPtr<str>, body_handle: BodyHandle, insert_config_mask: KvInsertConfigOptions, insert_configuration: GuestPtr<KvInsertConfig>, pending_handle_out: GuestPtr<KvStoreInsertHandle>, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn insert_wait<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, pending_insert_handle: KvStoreInsertHandle, kv_error_out: GuestPtr<KvError>, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn delete<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, store: KvStoreHandle, key: GuestPtr<str>, _delete_config_mask: KvDeleteConfigOptions, _delete_configuration: GuestPtr<KvDeleteConfig>, pending_handle_out: GuestPtr<KvStoreDeleteHandle>, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn delete_wait<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, pending_delete_handle: KvStoreDeleteHandle, kv_error_out: GuestPtr<KvError>, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn list<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, store: KvStoreHandle, list_config_mask: KvListConfigOptions, list_configuration: GuestPtr<KvListConfig>, pending_handle_out: GuestPtr<KvStoreListHandle>, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn list_wait<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, pending_kv_list_handle: KvStoreListHandle, body_handle_out: GuestPtr<BodyHandle>, kv_error_out: GuestPtr<KvError>, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

impl FastlyLog for Session

Source§

fn endpoint_get( &mut self, memory: &mut GuestMemory<'_>, name: GuestPtr<[u8]>, ) -> Result<EndpointHandle, Error>

Source§

fn write( &mut self, memory: &mut GuestMemory<'_>, endpoint_handle: EndpointHandle, msg: GuestPtr<[u8]>, ) -> Result<u32, Error>

Source§

impl FastlyObjectStore for Session

Source§

fn open( &mut self, memory: &mut GuestMemory<'_>, name: GuestPtr<str>, ) -> Result<ObjectStoreHandle, Error>

Source§

fn lookup( &mut self, memory: &mut GuestMemory<'_>, store: ObjectStoreHandle, key: GuestPtr<str>, opt_body_handle_out: GuestPtr<BodyHandle>, ) -> Result<(), Error>

Source§

fn lookup_async<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, store: ObjectStoreHandle, key: GuestPtr<str>, opt_pending_body_handle_out: GuestPtr<PendingKvLookupHandle>, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn pending_lookup_wait<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, pending_body_handle: PendingKvLookupHandle, opt_body_handle_out: GuestPtr<BodyHandle>, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn insert<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, store: ObjectStoreHandle, key: GuestPtr<str>, body_handle: BodyHandle, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn insert_async<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, store: ObjectStoreHandle, key: GuestPtr<str>, body_handle: BodyHandle, opt_pending_body_handle_out: GuestPtr<PendingKvInsertHandle>, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn pending_insert_wait<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, _memory: &'life1 mut GuestMemory<'life2>, pending_insert_handle: PendingKvInsertHandle, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn delete_async<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, store: ObjectStoreHandle, key: GuestPtr<str>, opt_pending_delete_handle_out: GuestPtr<PendingKvDeleteHandle>, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn pending_delete_wait<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, _memory: &'life1 mut GuestMemory<'life2>, pending_delete_handle: PendingKvDeleteHandle, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

impl FastlyPurge for Session

Source§

fn purge_surrogate_key( &mut self, memory: &mut GuestMemory<'_>, surrogate_key: GuestPtr<str>, options_mask: PurgeOptionsMask, _options: GuestPtr<PurgeOptions>, ) -> Result<(), Error>

Source§

impl FastlySecretStore for Session

Source§

fn open( &mut self, memory: &mut GuestMemory<'_>, name: GuestPtr<str>, ) -> Result<SecretStoreHandle, Error>

Source§

fn get( &mut self, memory: &mut GuestMemory<'_>, secret_store_handle: SecretStoreHandle, secret_name: GuestPtr<str>, ) -> Result<SecretHandle, Error>

Source§

fn plaintext( &mut self, memory: &mut GuestMemory<'_>, secret_handle: SecretHandle, plaintext_buf: GuestPtr<u8>, plaintext_max_len: u32, nwritten_out: GuestPtr<u32>, ) -> Result<(), Error>

Source§

fn from_bytes( &mut self, memory: &mut GuestMemory<'_>, plaintext_buf: GuestPtr<u8>, plaintext_len: u32, ) -> Result<SecretHandle, Error>

Source§

impl FastlyShielding for Session

Source§

fn shield_info( &mut self, memory: &mut GuestMemory<'_>, name: GuestPtr<str>, out_buffer: GuestPtr<u8>, out_buffer_max_len: u32, ) -> Result<u32, Error>

Source§

fn backend_for_shield( &mut self, memory: &mut GuestMemory<'_>, shield_name: GuestPtr<str>, shield_backend_options: ShieldBackendOptions, shield_backend_config: GuestPtr<ShieldBackendConfig>, out_buffer: GuestPtr<u8>, out_buffer_max_len: u32, ) -> Result<u32, Error>

Source§

impl FastlyUap for Session

Source§

fn parse( &mut self, _memory: &mut GuestMemory<'_>, _user_agent: GuestPtr<str>, _family: GuestPtr<u8>, _family_len: u32, _family_nwritten_out: GuestPtr<u32>, _major: GuestPtr<u8>, _major_len: u32, _major_nwritten_out: GuestPtr<u32>, _minor: GuestPtr<u8>, _minor_len: u32, _minor_nwritten_out: GuestPtr<u32>, _patch: GuestPtr<u8>, _patch_len: u32, _patch_nwritten_out: GuestPtr<u32>, ) -> Result<(), Error>

Source§

impl UserErrorConversion for Session

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> GetSetFdFlags for T

Source§

fn get_fd_flags(&self) -> Result<FdFlags, Error>
where T: AsFilelike,

Query the “status” flags for the self file descriptor.
Source§

fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>
where T: AsFilelike,

Create a new SetFdFlags value for use with set_fd_flags. Read more
Source§

fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>
where T: AsFilelike,

Set the “status” flags for the self file descriptor. Read more
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Pointee for T

Source§

type Pointer = u32

Source§

fn debug( pointer: <T as Pointee>::Pointer, f: &mut Formatter<'_>, ) -> Result<(), Error>

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more