referrerpolicy=no-referrer-when-downgrade
collectives_westend_runtime::ambassador

Type Alias ExchangeOrigin

Source
pub type ExchangeOrigin = EitherOf<EnsureRootWithSuccess<AccountId, ConstU16<65535>>, Fellows>;
Expand description

Exchange is by any of:

  • Root can exchange arbitrarily.
  • the Fellows origin

Aliased Type§

struct ExchangeOrigin(/* private fields */);

Trait Implementations

Source§

impl<OuterOrigin, L, R> EnsureOrigin<OuterOrigin> for EitherOf<L, R>
where L: EnsureOrigin<OuterOrigin>, R: EnsureOrigin<OuterOrigin, Success = <L as EnsureOrigin<OuterOrigin>>::Success>,

Source§

type Success = <L as EnsureOrigin<OuterOrigin>>::Success

A return type.
Source§

fn try_origin( o: OuterOrigin, ) -> Result<<EitherOf<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 EitherOf<L, R>
where L: EnsureOriginWithArg<OuterOrigin, Argument>, R: EnsureOriginWithArg<OuterOrigin, Argument, Success = <L as EnsureOriginWithArg<OuterOrigin, Argument>>::Success>,

Source§

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

A return type.
Source§

fn try_origin( o: OuterOrigin, a: &Argument, ) -> Result<<EitherOf<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.