Struct worker_kv::KvValue[][src]

pub struct KvValue(_);

A value fetched via a get request.

Implementations

impl KvValue[src]

pub fn as_string(self) -> String[src]

Gets the value as a string.

pub fn as_json<T: DeserializeOwned>(self) -> Result<T, KvError>[src]

Tries to eserialize the inner text to the generic type.

pub fn as_bytes<'a>(&'a self) -> &'a [u8][src]

Gets the value as a byte slice.

Trait Implementations

impl Clone for KvValue[src]

impl Debug for KvValue[src]

Auto Trait Implementations

impl RefUnwindSafe for KvValue

impl Send for KvValue

impl Sync for KvValue

impl Unpin for KvValue

impl UnwindSafe for KvValue

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, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.