[][src]Trait cw_storage_plus::PrimaryKey

pub trait PrimaryKey<'a>: Clone {
    type Prefix: Prefixer<'a>;
    fn key<'b>(&'b self) -> Vec<&'b [u8]>;
fn parse_key(serialized: &'a [u8]) -> Self; fn joined_key(&self) -> Vec<u8> { ... } }

Associated Types

type Prefix: Prefixer<'a>

Loading content...

Required methods

fn key<'b>(&'b self) -> Vec<&'b [u8]>

returns a slice of key steps, which can be optionally combined

fn parse_key(serialized: &'a [u8]) -> Self

extracts a single or composite key from a joined key, only lives as long as the original bytes

Loading content...

Provided methods

fn joined_key(&self) -> Vec<u8>

Loading content...

Implementations on Foreign Types

impl<'a> PrimaryKey<'a> for &'a [u8][src]

type Prefix = ()

impl<'a> PrimaryKey<'a> for &'a str[src]

type Prefix = ()

impl<'a, T: PrimaryKey<'a> + Prefixer<'a>, U: PrimaryKey<'a>> PrimaryKey<'a> for (T, U)[src]

type Prefix = T

Loading content...

Implementors

impl<'a> PrimaryKey<'a> for PkOwned[src]

type Prefix = ()

impl<'a, T: AsRef<PkOwned> + From<PkOwned> + Clone> PrimaryKey<'a> for T[src]

type Prefix = ()

Loading content...