Struct kv_assets::KV[][src]

pub struct KV { /* fields omitted */ }

Workers KV Parameters

Implementations

impl KV[src]

pub async fn get_kv_value(&self, key: &str) -> Result<Bytes, Error>[src]

Lookup asset in worker kV storage. If the key passed had been obtained from lookup_key, but the value was not found, then one of the following occurred:

  • the asset was deleted from KV
  • the value timed out via TTL
  • the index is out of date

pub async fn delete_kv_value(&self, key: &str) -> Result<(), Error>[src]

Delete the key at path.

pub async fn put_kv_value<T: Into<Body>>(
    &self,
    key: &str,
    val: T,
    expiration_ttl: Option<u64>
) -> Result<(), Error>
[src]

Store a value in KV. Optionally, set expiration TTL, number of seconds in future when content should be automatically deleted. TTL must be at least 60.

Auto Trait Implementations

impl RefUnwindSafe for KV[src]

impl Send for KV[src]

impl Sync for KV[src]

impl Unpin for KV[src]

impl UnwindSafe for KV[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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