Struct pallet_collective::Proposals [−][src]
pub struct Proposals<T: Config<I>, I: Instance = DefaultInstance>(_);
Expand description
The hashes of the active proposals.
Trait Implementations
impl<T: Config<I>, I: Instance> StorageValue<BoundedVec<<T as Config>::Hash, <T as Config<I>>::MaxProposals>> for Proposals<T, I>
impl<T: Config<I>, I: Instance> StorageValue<BoundedVec<<T as Config>::Hash, <T as Config<I>>::MaxProposals>> for Proposals<T, I>type Query = BoundedVec<T::Hash, T::MaxProposals>
type Query = BoundedVec<T::Hash, T::MaxProposals>The type that get/take returns.
Module prefix. Used for generating final key.
Storage prefix. Used for generating final key.
fn from_optional_value_to_query(
v: Option<BoundedVec<T::Hash, T::MaxProposals>>
) -> Self::Query
fn from_optional_value_to_query(
v: Option<BoundedVec<T::Hash, T::MaxProposals>>
) -> Self::QueryConvert an optional value retrieved from storage to the type queried.
fn from_query_to_optional_value(
v: Self::Query
) -> Option<BoundedVec<T::Hash, T::MaxProposals>>
fn from_query_to_optional_value(
v: Self::Query
) -> Option<BoundedVec<T::Hash, T::MaxProposals>>Convert a query to an optional value into storage.
Generate the full key used in top storage.
Auto Trait Implementations
impl<T, I> RefUnwindSafe for Proposals<T, I> where
I: RefUnwindSafe,
T: RefUnwindSafe, impl<T, I> UnwindSafe for Proposals<T, I> where
I: UnwindSafe,
T: UnwindSafe, 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 = TShould always be Self
type Query = <G as StorageValue<T>>::Query
type Query = <G as StorageValue<T>>::QueryThe type that get/take return.
Get the storage key.
Load the value from the provided storage instance.
Try to get the underlying value from the provided storage instance. Read more
Translate a value from some previous type (O) to the current type. Read more
Store a value under this key into the provided storage instance.
Store a value under this key into the provided storage instance; this uses the query type rather than the underlying value. Read more
Mutate the value
pub fn try_mutate<R, E, F>(f: F) -> Result<R, E> where
F: FnOnce(&mut <G as StorageValue<T>>::Query) -> Result<R, E>,
pub fn try_mutate<R, E, F>(f: F) -> Result<R, E> where
F: FnOnce(&mut <G as StorageValue<T>>::Query) -> Result<R, E>, Mutate the value if closure returns Ok
Take a value from storage, removing it afterwards.
pub fn append<Item, EncodeLikeItem>(item: EncodeLikeItem) where
T: StorageAppend<Item>,
Item: Encode,
EncodeLikeItem: EncodeLike<Item>,
pub fn append<Item, EncodeLikeItem>(item: EncodeLikeItem) where
T: StorageAppend<Item>,
Item: Encode,
EncodeLikeItem: EncodeLike<Item>, Append the given item to the value in the storage. Read more
Read the length of the storage value without decoding the entire value. 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) -> boolChecks 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) -> SSUse 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) -> SPThe inclusion map: converts self to the equivalent element of its superset.
impl<T, I, StorageValueT> TryAppendValue<T, I> for StorageValueT where
I: Encode,
T: FullCodec + StorageTryAppend<I>,
StorageValueT: StorageValue<T>,
impl<T, I, StorageValueT> TryAppendValue<T, I> for StorageValueT where
I: Encode,
T: FullCodec + StorageTryAppend<I>,
StorageValueT: StorageValue<T>, The counterpart to unchecked_from.
Consume self to return an equivalent value of T.
pub fn vzip(self) -> V