Struct noble_collective::Module [−][src]
Implementations
impl<T: Config<I> + 'static, I: Instance> Module<T, I>
[src]
pub fn proposals() -> Vec<T::Hash>
[src]
The hashes of the active proposals.
pub fn proposal_of<K: EncodeLike<T::Hash>>(
key: K
) -> Option<<T as Config<I>>::Proposal>
[src]
key: K
) -> Option<<T as Config<I>>::Proposal>
Actual proposal for a given hash, if it’s current.
pub fn voting<K: EncodeLike<T::Hash>>(
key: K
) -> Option<Votes<T::AccountId, T::BlockNumber>>
[src]
key: K
) -> Option<Votes<T::AccountId, T::BlockNumber>>
Votes on a given proposal, if it is ongoing.
pub fn proposal_count() -> u32
[src]
Proposals so far.
pub fn members() -> Vec<T::AccountId>
[src]
The current members of the collective. This is stored sorted (just by value).
pub fn prime() -> Option<T::AccountId>
[src]
The prime member that helps determine the default vote behavior in case of absentations.
impl<T: Config<I>, I: Instance> Module<T, I>
[src]
Trait Implementations
impl<T: Config<I>, I: Instance> Callable<T> for Module<T, I>
[src]
impl<T: Config<I>, I: Instance> ChangeMembers<<T as Config>::AccountId> for Module<T, I>
[src]
fn change_members_sorted(
_incoming: &[T::AccountId],
outgoing: &[T::AccountId],
new: &[T::AccountId]
)
[src]
_incoming: &[T::AccountId],
outgoing: &[T::AccountId],
new: &[T::AccountId]
)
Update the members of the collective. Votes are updated and the prime is reset.
NOTE: Does not enforce the expected MaxMembers
limit on the amount of members, but
the weight estimations rely on it to estimate dispatchable weight.
Weight
O(MP + N)
- where
M
old-members-count (governance-bounded) - where
N
new-members-count (governance-bounded) - where
P
proposals-count
- where
- DB:
- 1 storage read (codec
O(P)
) for reading the proposals P
storage mutations for updating the votes (codecO(M)
)- 1 storage write (codec
O(N)
) for storing the new members - 1 storage write (codec
O(1)
) for deleting the old prime
- 1 storage read (codec
fn set_prime(prime: Option<T::AccountId>)
[src]
fn get_prime() -> Option<T::AccountId>
[src]
pub fn change_members(
incoming: &[AccountId],
outgoing: &[AccountId],
new: Vec<AccountId, Global>
)
[src]
incoming: &[AccountId],
outgoing: &[AccountId],
new: Vec<AccountId, Global>
)
pub fn set_members_sorted(new_members: &[AccountId], old_members: &[AccountId])
[src]
pub fn compute_members_diff_sorted(
new_members: &[AccountId],
old_members: &[AccountId]
) -> (Vec<AccountId, Global>, Vec<AccountId, Global>)
[src]
new_members: &[AccountId],
old_members: &[AccountId]
) -> (Vec<AccountId, Global>, Vec<AccountId, Global>)
impl<T: Clone + Config<I>, I: Clone + Instance> Clone for Module<T, I>
[src]
impl<T: Copy + Config<I>, I: Copy + Instance> Copy for Module<T, I>
[src]
impl<T: Config<I>, I: Instance> Debug for Module<T, I> where
T: Debug,
I: Debug,
[src]
T: Debug,
I: Debug,
impl<T: Eq + Config<I>, I: Eq + Instance> Eq for Module<T, I>
[src]
impl<T: Config<I>, I: Instance> GetNobleVersion for Module<T, I>
[src]
fn current_version() -> NobleVersion
[src]
fn storage_version() -> Option<NobleVersion>
[src]
impl<T: Config<I>, I: Instance> InitializeMembers<<T as Config>::AccountId> for Module<T, I>
[src]
fn initialize_members(members: &[T::AccountId])
[src]
impl<T: Config<I>, I: Instance> IntegrityTest for Module<T, I>
[src]
pub fn integrity_test()
[src]
impl<T: Config<I>, I: Instance> ModuleErrorMetadata for Module<T, I>
[src]
fn metadata() -> &'static [ErrorMetadata]
[src]
impl<T: Config + Config<I>, I: Instance> OffchainWorker<<T as Config>::BlockNumber> for Module<T, I>
[src]
pub fn offchain_worker(_n: BlockNumber)
[src]
impl<T: Config + Config<I>, I: Instance> OnFinalize<<T as Config>::BlockNumber> for Module<T, I>
[src]
pub fn on_finalize(_n: BlockNumber)
[src]
impl<T: Config<I>, I: Instance> OnGenesis for Module<T, I>
[src]
fn on_genesis()
[src]
impl<T: Config + Config<I>, I: Instance> OnInitialize<<T as Config>::BlockNumber> for Module<T, I>
[src]
pub fn on_initialize(_n: BlockNumber) -> u64
[src]
impl<T: Config<I>, I: Instance> OnRuntimeUpgrade for Module<T, I>
[src]
fn on_runtime_upgrade() -> Weight
[src]
impl<T: PartialEq + Config<I>, I: PartialEq + Instance> PartialEq<Module<T, I>> for Module<T, I>
[src]
impl<T: Config<I>, I: Instance> StructuralEq for Module<T, I>
[src]
impl<T: Config<I>, I: Instance> StructuralPartialEq for Module<T, I>
[src]
Auto Trait Implementations
impl<T, I> RefUnwindSafe for Module<T, I> where
I: RefUnwindSafe,
T: RefUnwindSafe,
I: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, I> Send for Module<T, I> where
I: Send,
T: Send,
I: Send,
T: Send,
impl<T, I> Sync for Module<T, I> where
I: Sync,
T: Sync,
I: Sync,
T: Sync,
impl<T, I> Unpin for Module<T, I> where
I: Unpin,
T: Unpin,
I: Unpin,
T: Unpin,
impl<T, I> UnwindSafe for Module<T, I> where
I: UnwindSafe,
T: UnwindSafe,
I: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> CheckedConversion for T
[src]
pub fn checked_from<T>(t: T) -> Option<Self> where
Self: TryFrom<T>,
[src]
Self: TryFrom<T>,
pub fn checked_into<T>(self) -> Option<T> where
Self: TryInto<T>,
[src]
Self: TryInto<T>,
impl<T> Downcast for T where
T: Any,
T: Any,
pub fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn as_any(&self) -> &(dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
impl<T> DowncastSync for T where
T: Any + Send + Sync,
T: Any + Send + Sync,
impl<T> DynClone for T where
T: Clone,
[src]
T: Clone,
pub fn __clone_box(&self, Private) -> *mut ()
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> IsType<T> for T
[src]
pub fn from_ref(t: &T) -> &T
[src]
pub fn into_ref(&self) -> &T
[src]
pub fn from_mut(t: &mut T) -> &mut T
[src]
pub fn into_mut(&mut self) -> &mut T
[src]
impl<T, Outer> IsWrappedBy<Outer> for T where
T: From<Outer>,
Outer: AsRef<T> + AsMut<T> + From<T>,
[src]
T: From<Outer>,
Outer: AsRef<T> + AsMut<T> + From<T>,
pub fn from_ref(outer: &Outer) -> &T
[src]
Get a reference to the inner from the outer.
pub fn from_mut(outer: &mut Outer) -> &mut T
[src]
Get a mutable reference to the inner from the outer.
impl<T> MaybeDebug for T where
T: Debug,
T: Debug,
impl<T> MaybeDebug for T where
T: Debug,
T: Debug,
impl<T> MaybeRefUnwindSafe for T where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Member for T where
T: 'static + Send + Sync + Debug + Eq + PartialEq<T> + Clone,
[src]
T: 'static + Send + Sync + Debug + Eq + PartialEq<T> + Clone,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> SaturatedConversion for T
pub fn saturated_from<T>(t: T) -> Self where
Self: UniqueSaturatedFrom<T>,
Self: UniqueSaturatedFrom<T>,
pub fn saturated_into<T>(self) -> T where
Self: UniqueSaturatedInto<T>,
Self: UniqueSaturatedInto<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>,
[src]
T: UncheckedFrom<S>,
pub fn unchecked_into(self) -> T
[src]
impl<T, S> UniqueSaturatedInto<T> for S where
T: Bounded,
S: TryInto<T>,
T: Bounded,
S: TryInto<T>,
pub fn unique_saturated_into(self) -> T
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,