Skip to main content

StoreValue

Trait StoreValue 

Source
pub trait StoreValue: FromSql {
    type Ref: ToSql + ?Sized;
}
Expand description

A type that can be used as the value of a Store.

This ties the owned value type (what Store::get returns) to its borrowed form (what Store::insert accepts). It is implemented for String (borrowed as str) and Vec<u8> (borrowed as [u8]).

Required Associated Types§

Source

type Ref: ToSql + ?Sized

The borrowed form accepted by Store::insert: str for String, [u8] for Vec<u8>.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl StoreValue for String

Source§

impl StoreValue for Vec<u8>

Source§

type Ref = [u8]

Implementors§