Trait frame_support::storage::types::QueryKindTrait [−][src]
pub trait QueryKindTrait<Value, OnEmpty> {
type Query: FullCodec + 'static;
const METADATA: StorageEntryModifier;
fn from_optional_value_to_query(v: Option<Value>) -> Self::Query;
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:
OptionQuerywhich convert an optional value to an optional value, user when querying storage will get an optional value.ValueQuerywhich convert an optional value to a value, user when querying storage will get a value.
Associated Types
Loading content...Associated Constants
const METADATA: StorageEntryModifier[src]
Metadata for the storage kind.
Required methods
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.
fn from_query_to_optional_value(v: Self::Query) -> Option<Value>[src]
Convert a query to an optional value.
Implementors
impl<Value> QueryKindTrait<Value, GetDefault> for OptionQuery where
Value: FullCodec + 'static, [src]
impl<Value> QueryKindTrait<Value, GetDefault> for OptionQuery where
Value: FullCodec + 'static, [src]const METADATA: StorageEntryModifier[src]
type Query = Option<Value>
fn from_optional_value_to_query(v: Option<Value>) -> Self::Query[src]
fn from_query_to_optional_value(v: Self::Query) -> Option<Value>[src]
impl<Value, OnEmpty> QueryKindTrait<Value, OnEmpty> for ValueQuery where
Value: FullCodec + 'static,
OnEmpty: Get<Value>, [src]
impl<Value, OnEmpty> QueryKindTrait<Value, OnEmpty> for ValueQuery where
Value: FullCodec + 'static,
OnEmpty: Get<Value>, [src]