Trait fabric_support::traits::OriginTrait[][src]

pub trait OriginTrait: Sized {
    type Call;
    type NoblesOrigin;
    type AccountId;
    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::NoblesOrigin;
fn none() -> Self;
fn root() -> Self;
fn signed(by: Self::AccountId) -> Self; }

Methods available on fabric_system::Config::Origin.

Associated Types

type Call[src]

Runtime call type, as in fabric_system::Config::Call

type NoblesOrigin[src]

The caller origin, overarching type of all nobles origins.

type AccountId[src]

The AccountId used across the system.

Loading content...

Required methods

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

Add a filter to the origin.

fn reset_filter(&mut self)[src]

Reset origin filters to default one, i.e fabric_system::Config::BaseCallFilter.

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

Replace the caller with caller from the other origin

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

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

fn caller(&self) -> &Self::NoblesOrigin[src]

Get the caller.

fn none() -> Self[src]

Create with system none origin and fabric-system::Config::BaseCallFilter.

fn root() -> Self[src]

Create with system root origin and no filter.

fn signed(by: Self::AccountId) -> Self[src]

Create with system signed origin and fabric-system::Config::BaseCallFilter.

Loading content...

Implementors

Loading content...