[][src]Trait frame_support::storage::types::QueryKindTrait

pub trait QueryKindTrait<Value, OnEmpty> {
    type Query: FullCodec + 'static;

    pub const METADATA: StorageEntryModifier;

    pub fn from_optional_value_to_query(v: Option<Value>) -> Self::Query;
pub fn from_query_to_optional_value(v: Self::Query) -> Option<Value>; }

Trait implementing how the storage optional value is converted into the queried type.

It is implemented by:

Associated Types

type Query: FullCodec + 'static[src]

Type returned on query

Loading content...

Associated Constants

pub const METADATA: StorageEntryModifier[src]

Metadata for the storage kind.

Loading content...

Required methods

pub fn from_optional_value_to_query(v: Option<Value>) -> Self::Query[src]

Convert an optional value (i.e. some if trie contains the value or none otherwise) to the query.

pub fn from_query_to_optional_value(v: Self::Query) -> Option<Value>[src]

Convert a query to an optional value.

Loading content...


impl<Value> QueryKindTrait<Value, GetDefault> for OptionQuery where
    Value: FullCodec + 'static, 

impl<Value, OnEmpty> QueryKindTrait<Value, OnEmpty> for ValueQuery where
    Value: FullCodec + 'static,
    OnEmpty: Get<Value>, 

Loading content...