referrerpolicy=no-referrer-when-downgrade
frame_support::traits

Trait CallerTrait

Source
pub trait CallerTrait<AccountId>:
    Parameter
    + Member
    + From<RawOrigin<AccountId>> {
    // Required methods
    fn into_system(self) -> Option<RawOrigin<AccountId>>;
    fn as_system_ref(&self) -> Option<&RawOrigin<AccountId>>;

    // Provided methods
    fn as_signed(&self) -> Option<&AccountId> { ... }
    fn is_root(&self) -> bool { ... }
    fn is_none(&self) -> bool { ... }
}
Expand description

The trait implemented by the overarching enumeration of the different pallets’ origins. Unlike OriginTrait impls, this does not include any kind of dispatch/call filter. Also, this trait is more flexible in terms of how it can be used: it is a Parameter and Member, so it can be used as dispatchable parameters as well as in storage items.

Required Methods§

Source

fn into_system(self) -> Option<RawOrigin<AccountId>>

Extract the signer from the message if it is a Signed origin.

Source

fn as_system_ref(&self) -> Option<&RawOrigin<AccountId>>

Extract a reference to the system-level RawOrigin if it is that.

Provided Methods§

Source

fn as_signed(&self) -> Option<&AccountId>

Extract the signer from it if a system Signed origin, None otherwise.

Source

fn is_root(&self) -> bool

Returns true if self is a system Root origin, None otherwise.

Source

fn is_none(&self) -> bool

Returns true if self is a system None origin, None otherwise.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

impl CallerTrait<<Runtime as Config>::AccountId> for OriginCaller

impl CallerTrait<<Runtime as Config>::AccountId> for OriginCaller

impl CallerTrait<<Runtime as Config>::AccountId> for OriginCaller

impl CallerTrait<<Runtime as Config>::AccountId> for OriginCaller

impl CallerTrait<<Runtime as Config>::AccountId> for OriginCaller

impl CallerTrait<<Runtime as Config>::AccountId> for OriginCaller

impl CallerTrait<<Test as Config>::AccountId> for OriginCaller

impl CallerTrait<<Runtime as Config>::AccountId> for OriginCaller

impl CallerTrait<<Runtime as Config>::AccountId> for OriginCaller

impl CallerTrait<<Runtime as Config>::AccountId> for OriginCaller

impl CallerTrait<<Test as Config>::AccountId> for OriginCaller

impl CallerTrait<<Runtime as Config>::AccountId> for OriginCaller

impl CallerTrait<<Runtime as Config>::AccountId> for OriginCaller

impl CallerTrait<<Runtime as Config>::AccountId> for OriginCaller

impl CallerTrait<<Runtime as Config>::AccountId> for OriginCaller