LookupResponse

Structin kv_storefastly 0.13.1View source
pub struct LookupResponse { /* private fields */ }

A response from a KV Store Lookup operation.

This type holds the Body, metadata, and generation of found key.

Methods

current_generation

View source
fn current_generation(&self) -> u64

Read the current generation of the KVStore item.

Returns the current generation in a u64

Parameters

self: &Self

Returns

u64

generation

deprecatedView source
Deprecated: generation has a bug in this version of the SDK, and will always return 0
fn generation(&self) -> u32

Read the generation of the KVStore item.

Returns the generation in a u32

Parameters

self: &Self

Returns

u32

metadata

View source
fn metadata(&self) -> Option<Bytes>

Read the metadata of the KVStore item.

Returns the metadata in a Option<bytes::Bytes>

Parameters

self: &Self

Returns

Option<bytes::Bytes>

take_body

View source
fn take_body(&mut self) -> Body

Return the Body from a LookupResponse.

Returns the body contents in a Body

Parameters

self: &mut Self

Returns

take_body_bytes

View source
fn take_body_bytes(&mut self) -> Vec<u8>

Convert the LookupResponse body into a byte vector.

Returns the body contents in a Vec<u8>

Parameters

self: &mut Self

Returns

Vec<u8>

try_take_body

View source
fn try_take_body(&mut self) -> Option<Body>

Take and return the body from this response if it has one, otherwise return None.

After calling this method, this response will no longer have a body.

Parameters

self: &mut Self

Returns

Auto trait implementations

Blanket implementations