[][src]Trait frame_support::traits::OriginTrait

pub trait OriginTrait: Sized {
    type Call;
    type PalletsOrigin;
    fn add_filter(&mut self, filter: impl Fn(&Self::Call) -> bool + 'static);
fn reset_filter(&mut self);
fn set_caller_from(&mut self, other: impl Into<Self>);
fn filter_call(&self, call: &Self::Call) -> bool;
fn caller(&self) -> &Self::PalletsOrigin; }

Methods available on frame_system::Trait::Origin.

Associated Types

type Call

Runtime call type, as in frame_system::Trait::Call

type PalletsOrigin

The caller origin, overarching type of all pallets origins.

Loading content...

Required methods

fn add_filter(&mut self, filter: impl Fn(&Self::Call) -> bool + 'static)

Add a filter to the origin.

fn reset_filter(&mut self)

Reset origin filters to default one, i.e frame_system::Trait::BaseCallFilter.

fn set_caller_from(&mut self, other: impl Into<Self>)

Replace the caller with caller from the other origin

fn filter_call(&self, call: &Self::Call) -> bool

Filter the call, if false then call is filtered out.

fn caller(&self) -> &Self::PalletsOrigin

Get the caller.

Loading content...

Implementors

Loading content...