Struct pallet_bounties::BountyDescriptions [−][src]
pub struct BountyDescriptions(_);
Expand description
The description of each bounty.
Trait Implementations
type Hasher = Twox64Concat
type Hasher = Twox64Concat
Hasher. Used for generating final key.
Module prefix. Used for generating final key.
Storage prefix. Used for generating final key.
Convert an optional value retrieved from storage to the type queried.
Convert a query to an optional value into storage.
The full prefix; just the hash of module_prefix
concatenated to the hash of
storage_prefix
. Read more
Generate the full key used in top storage.
Module prefix. Used for generating final key.
Storage prefix. Used for generating final key.
Final full prefix that prefixes all keys.
Remove all value of the storage.
Iter over all value of the storage. Read more
fn translate_values<OldValue, F>(f: F) where
F: FnMut(OldValue) -> Option<Value>,
OldValue: Decode,
fn translate_values<OldValue, F>(f: F) where
F: FnMut(OldValue) -> Option<Value>,
OldValue: Decode,
Translate the values of all elements by a function f
, in the map in no particular order.
By returning None
from f
for an element, you’ll remove it from the map. Read more
Auto Trait Implementations
impl RefUnwindSafe for BountyDescriptions
impl Send for BountyDescriptions
impl Sync for BountyDescriptions
impl Unpin for BountyDescriptions
impl UnwindSafe for BountyDescriptions
Blanket Implementations
Mutably borrows from an owned value. Read more
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read more
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
type Output = T
type Output = T
Should always be Self
type Query = <G as StorageMap<K, V>>::Query
type Query = <G as StorageMap<K, V>>::Query
The type that get/take return.
Get the storage key used to fetch a value corresponding to a specific key.
Swap the values of two keys.
Does the value (explicitly) exist in storage?
Load the value associated with the given key from the map.
Try to get the value for the given key from the map. Read more
Store a value to be associated with the given key from the map.
pub fn mutate<KeyArg, R, F>(key: KeyArg, f: F) -> R where
F: FnOnce(&mut <G as StorageMap<K, V>>::Query) -> R,
KeyArg: EncodeLike<K>,
pub fn mutate<KeyArg, R, F>(key: KeyArg, f: F) -> R where
F: FnOnce(&mut <G as StorageMap<K, V>>::Query) -> R,
KeyArg: EncodeLike<K>,
Mutate the value under a key.
pub fn mutate_exists<KeyArg, R, F>(key: KeyArg, f: F) -> R where
F: FnOnce(&mut Option<V>) -> R,
KeyArg: EncodeLike<K>,
pub fn mutate_exists<KeyArg, R, F>(key: KeyArg, f: F) -> R where
F: FnOnce(&mut Option<V>) -> R,
KeyArg: EncodeLike<K>,
Mutate the value under a key. Read more
pub fn try_mutate<KeyArg, R, E, F>(key: KeyArg, f: F) -> Result<R, E> where
F: FnOnce(&mut <G as StorageMap<K, V>>::Query) -> Result<R, E>,
KeyArg: EncodeLike<K>,
pub fn try_mutate<KeyArg, R, E, F>(key: KeyArg, f: F) -> Result<R, E> where
F: FnOnce(&mut <G as StorageMap<K, V>>::Query) -> Result<R, E>,
KeyArg: EncodeLike<K>,
Mutate the item, only if an Ok
value is returned.
Mutate the item, only if an Ok
value is returned. Deletes the item if mutated to a None
.
pub fn take<KeyArg>(key: KeyArg) -> <G as StorageMap<K, V>>::Query where
KeyArg: EncodeLike<K>,
pub fn take<KeyArg>(key: KeyArg) -> <G as StorageMap<K, V>>::Query where
KeyArg: EncodeLike<K>,
Take the value under a key.
pub fn append<Item, EncodeLikeItem, EncodeLikeKey>(
key: EncodeLikeKey,
item: EncodeLikeItem
) where
Item: Encode,
V: StorageAppend<Item>,
EncodeLikeItem: EncodeLike<Item>,
EncodeLikeKey: EncodeLike<K>,
pub fn append<Item, EncodeLikeItem, EncodeLikeKey>(
key: EncodeLikeKey,
item: EncodeLikeItem
) where
Item: Encode,
V: StorageAppend<Item>,
EncodeLikeItem: EncodeLike<Item>,
EncodeLikeKey: EncodeLike<K>,
Append the given items to the value in the storage. Read more
pub fn migrate_key<OldHasher, KeyArg>(key: KeyArg) -> Option<V> where
KeyArg: EncodeLike<K>,
OldHasher: StorageHasher,
pub fn migrate_key<OldHasher, KeyArg>(key: KeyArg) -> Option<V> where
KeyArg: EncodeLike<K>,
OldHasher: StorageHasher,
Migrate an item with the given key
from a defunct OldHasher
to the current hasher. Read more
fn decode_len<KeyArg>(key: KeyArg) -> Option<usize> where
V: StorageDecodeLength,
KeyArg: EncodeLike<K>,
fn decode_len<KeyArg>(key: KeyArg) -> Option<usize> where
V: StorageDecodeLength,
KeyArg: EncodeLike<K>,
Read the length of the storage value without decoding the entire value under the
given key
. Read more
Migrate an item with the given key
from a blake2_256
hasher to the current hasher. Read more
The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
pub fn is_in_subset(&self) -> bool
pub fn is_in_subset(&self) -> bool
Checks if self
is actually part of its subset T
(and can be converted to it).
pub fn to_subset_unchecked(&self) -> SS
pub fn to_subset_unchecked(&self) -> SS
Use with care! Same as self.to_subset
but without any property checks. Always succeeds.
pub fn from_subset(element: &SS) -> SP
pub fn from_subset(element: &SS) -> SP
The inclusion map: converts self
to the equivalent element of its superset.
impl<K, T, I, StorageMapT> TryAppendMap<K, T, I> for StorageMapT where
T: FullCodec + StorageTryAppend<I>,
K: FullCodec,
I: Encode,
StorageMapT: StorageMap<K, T>,
impl<K, T, I, StorageMapT> TryAppendMap<K, T, I> for StorageMapT where
T: FullCodec + StorageTryAppend<I>,
K: FullCodec,
I: Encode,
StorageMapT: StorageMap<K, T>,
The counterpart to unchecked_from
.
Consume self to return an equivalent value of T
.
pub fn vzip(self) -> V