[][src]Trait cw_storage_plus::PrimaryKey

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

Associated Types

Loading content...

Required methods

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

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

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

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

Loading content...

Provided methods

pub fn joined_key(&self) -> Vec<u8>[src]

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...