Skip to main content

Cacheable

Trait Cacheable 

Source
pub trait Cacheable:
    Serialize
    + DeserializeOwned
    + Debug {
    type Key: Debug;

    const TABLE: &'static str;
    const KEY_KCOLS: &'static [&'static str];
    const KEY_VCOLS: &'static [&'static str];
    const REFRESH: RefreshKind;

    // Required method
    fn key_col_values(key: &Self::Key) -> Result<Vec<&dyn ToSql>, AE>;
}

Required Associated Constants§

Source

const TABLE: &'static str

Source

const KEY_KCOLS: &'static [&'static str]

Source

const KEY_VCOLS: &'static [&'static str]

Source

const REFRESH: RefreshKind

Required Associated Types§

Required Methods§

Source

fn key_col_values(key: &Self::Key) -> Result<Vec<&dyn ToSql>, AE>

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl Cacheable for MrState

Source§

const TABLE: &'static str = "cvelist_mr_1"

Source§

const KEY_KCOLS: &'static [&'static str]

Source§

const KEY_VCOLS: &'static [&'static str]

Source§

const REFRESH: RefreshKind

Source§

type Key = u32

Source§

impl Cacheable for Parsed

Source§

const TABLE: &'static str = "xsagit_parsed_1"

Source§

const KEY_KCOLS: &'static [&'static str]

Source§

const KEY_VCOLS: &'static [&'static str]

Source§

const REFRESH: RefreshKind = RefreshKind::XsaParsed

Source§

type Key = (u32, u32)