pub type AssetsForceOrigin = EnsureRoot<AccountId>;
Aliased Type§
struct AssetsForceOrigin(/* private fields */);
Trait Implementations
Source§impl<O, AccountId> EnsureOrigin<O> for EnsureRoot<AccountId>
impl<O, AccountId> EnsureOrigin<O> for EnsureRoot<AccountId>
Source§fn try_origin(
o: O,
) -> Result<<EnsureRoot<AccountId> as EnsureOrigin<O>>::Success, O>
fn try_origin( o: O, ) -> Result<<EnsureRoot<AccountId> as EnsureOrigin<O>>::Success, O>
Perform the origin check.
Source§fn try_successful_origin() -> Result<O, ()>
fn try_successful_origin() -> Result<O, ()>
Attempt to get an outer origin capable of passing
try_origin
check. May return Err
if it
is impossible. Read moreSource§fn ensure_origin(o: OuterOrigin) -> Result<Self::Success, BadOrigin>
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,
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,
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<O, AccountId, T> EnsureOriginWithArg<O, T> for EnsureRoot<AccountId>
impl<O, AccountId, T> EnsureOriginWithArg<O, T> for EnsureRoot<AccountId>
Source§type Success = <EnsureRoot<AccountId> as EnsureOrigin<O>>::Success
type Success = <EnsureRoot<AccountId> as EnsureOrigin<O>>::Success
A return type.
Source§fn try_origin(
o: O,
_: &T,
) -> Result<<EnsureRoot<AccountId> as EnsureOriginWithArg<O, T>>::Success, O>
fn try_origin( o: O, _: &T, ) -> Result<<EnsureRoot<AccountId> as EnsureOriginWithArg<O, T>>::Success, O>
Perform the origin check, returning the origin value if unsuccessful. This allows chaining.