referrerpolicy=no-referrer-when-downgrade
collectives_westend_runtime

Type Alias CollatorSelectionUpdateOrigin

Source
pub type CollatorSelectionUpdateOrigin = EitherOfDiverse<EnsureRoot<AccountId>, EnsureXcm<IsVoiceOfBody<GovernanceLocation, StakingAdminBodyId>>>;
Expand description

We allow root and the StakingAdmin to execute privileged collator selection operations.

Aliased Type§

struct CollatorSelectionUpdateOrigin(/* private fields */);

Trait Implementations

Source§

impl<OuterOrigin, L, R> EnsureOrigin<OuterOrigin> for EitherOfDiverse<L, R>
where L: EnsureOrigin<OuterOrigin>, R: EnsureOrigin<OuterOrigin>,

Source§

type Success = Either<<L as EnsureOrigin<OuterOrigin>>::Success, <R as EnsureOrigin<OuterOrigin>>::Success>

A return type.
Source§

fn try_origin( o: OuterOrigin, ) -> Result<<EitherOfDiverse<L, R> as EnsureOrigin<OuterOrigin>>::Success, OuterOrigin>

Perform the origin check.
Source§

fn try_successful_origin() -> Result<OuterOrigin, ()>

Attempt to get an outer origin capable of passing try_origin check. May return Err if it is impossible. Read more
Source§

fn ensure_origin(o: OuterOrigin) -> Result<Self::Success, BadOrigin>

Perform the origin check.
Source§

fn ensure_origin_or_root( o: OuterOrigin, ) -> Result<Option<Self::Success>, BadOrigin>
where OuterOrigin: OriginTrait,

The same as ensure_origin except that Root origin will always pass. This can only be used if Success has a sensible impl of Default since that will be used in the result.
Source§

fn try_origin_or_root( o: OuterOrigin, ) -> Result<Option<Self::Success>, OuterOrigin>
where OuterOrigin: OriginTrait,

The same as try_origin except that Root origin will always pass. This can only be used if Success has a sensible impl of Default since that will be used in the result.
Source§

impl<OuterOrigin, L, R, Argument> EnsureOriginWithArg<OuterOrigin, Argument> for EitherOfDiverse<L, R>
where L: EnsureOriginWithArg<OuterOrigin, Argument>, R: EnsureOriginWithArg<OuterOrigin, Argument>,

Source§

type Success = Either<<L as EnsureOriginWithArg<OuterOrigin, Argument>>::Success, <R as EnsureOriginWithArg<OuterOrigin, Argument>>::Success>

A return type.
Source§

fn try_origin( o: OuterOrigin, a: &Argument, ) -> Result<<EitherOfDiverse<L, R> as EnsureOriginWithArg<OuterOrigin, Argument>>::Success, OuterOrigin>

Perform the origin check, returning the origin value if unsuccessful. This allows chaining.
Source§

fn try_successful_origin(a: &Argument) -> Result<OuterOrigin, ()>

Attempt to get an outer origin capable of passing try_origin check. May return Err if it is impossible. Read more
Source§

fn ensure_origin( o: OuterOrigin, a: &Argument, ) -> Result<Self::Success, BadOrigin>

Perform the origin check.