Struct kv_assets::KV [−][src]
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]
&self,
key: &str,
val: T,
expiration_ttl: Option<u64>
) -> Result<(), Error>
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,