Struct pallet_nomination_pools::mock::RuntimeOrigin
source · pub struct RuntimeOrigin { /* private fields */ }
Expand description
The runtime origin type representing the origin of a call.
Origin is always created with the base filter configured in frame_system::Config::BaseCallFilter
.
Implementations§
source§impl RuntimeOrigin
impl RuntimeOrigin
sourcepub fn none() -> Self
pub fn none() -> Self
Create with system none origin and frame_system::Config::BaseCallFilter
.
sourcepub fn root() -> Self
pub fn root() -> Self
Create with system root origin and frame_system::Config::BaseCallFilter
.
Trait Implementations§
source§impl Clone for RuntimeOrigin
impl Clone for RuntimeOrigin
source§fn clone(&self) -> RuntimeOrigin
fn clone(&self) -> RuntimeOrigin
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for RuntimeOrigin
impl Debug for RuntimeOrigin
source§impl From<OriginCaller> for RuntimeOrigin
impl From<OriginCaller> for RuntimeOrigin
source§fn from(x: OriginCaller) -> Self
fn from(x: OriginCaller) -> Self
Converts to this type from the input type.
source§impl From<RuntimeOrigin> for Result<Origin<Runtime>, RuntimeOrigin>
impl From<RuntimeOrigin> for Result<Origin<Runtime>, RuntimeOrigin>
source§fn from(val: RuntimeOrigin) -> Self
fn from(val: RuntimeOrigin) -> Self
NOTE: converting to pallet origin loses the origin filter information.
source§impl OriginTrait for RuntimeOrigin
impl OriginTrait for RuntimeOrigin
§type Call = <Runtime as Config>::RuntimeCall
type Call = <Runtime as Config>::RuntimeCall
Runtime call type, as in
frame_system::Config::Call
§type PalletsOrigin = OriginCaller
type PalletsOrigin = OriginCaller
The caller origin, overarching type of all pallets origins.
source§fn add_filter(&mut self, filter: impl Fn(&Self::Call) -> bool + 'static)
fn add_filter(&mut self, filter: impl Fn(&Self::Call) -> bool + 'static)
Add a filter to the origin.
source§fn reset_filter(&mut self)
fn reset_filter(&mut self)
Reset origin filters to default one, i.e
frame_system::Config::BaseCallFilter
.source§fn set_caller_from(&mut self, other: impl Into<Self>)
fn set_caller_from(&mut self, other: impl Into<Self>)
Replace the caller with caller from the other origin
source§fn filter_call(&self, call: &Self::Call) -> bool
fn filter_call(&self, call: &Self::Call) -> bool
Filter the call if caller is not root, if false is returned then the call must be filtered
out. Read more
source§fn caller(&self) -> &Self::PalletsOrigin
fn caller(&self) -> &Self::PalletsOrigin
Get a reference to the caller (
CallerTrait
impl).source§fn into_caller(self) -> Self::PalletsOrigin
fn into_caller(self) -> Self::PalletsOrigin
Consume
self
and return the caller.source§fn try_with_caller<R>(
self,
f: impl FnOnce(Self::PalletsOrigin) -> Result<R, Self::PalletsOrigin>
) -> Result<R, Self>
fn try_with_caller<R>( self, f: impl FnOnce(Self::PalletsOrigin) -> Result<R, Self::PalletsOrigin> ) -> Result<R, Self>
Do something with the caller, consuming self but returning it if the caller was unused.
source§fn signed(by: Self::AccountId) -> Self
fn signed(by: Self::AccountId) -> Self
Create with system signed origin and
frame_system::Config::BaseCallFilter
.source§fn as_signed(self) -> Option<Self::AccountId>
fn as_signed(self) -> Option<Self::AccountId>
👎Deprecated: Use
into_signer
insteadExtract the signer from the message if it is a
Signed
origin.source§fn into_signer(self) -> Option<Self::AccountId>
fn into_signer(self) -> Option<Self::AccountId>
Extract the signer from the message if it is a
Signed
origin.Auto Trait Implementations§
impl !RefUnwindSafe for RuntimeOrigin
impl !Send for RuntimeOrigin
impl !Sync for RuntimeOrigin
impl Unpin for RuntimeOrigin
impl !UnwindSafe for RuntimeOrigin
Blanket Implementations§
source§impl<T> CheckedConversion for T
impl<T> CheckedConversion for T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T, Outer> IsWrappedBy<Outer> for Twhere
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
impl<T, Outer> IsWrappedBy<Outer> for Twhere Outer: AsRef<T> + AsMut<T> + From<T>, T: From<Outer>,
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
source§fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Selfwhere Self: UniqueSaturatedFrom<T>,
source§fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> Twhere Self: UniqueSaturatedInto<T>,
Consume self to return an equivalent value of
T
. Read more§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.source§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere T: UncheckedFrom<S>,
source§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
The counterpart to
unchecked_from
.source§impl<T, S> UniqueSaturatedInto<T> for Swhere
T: Bounded,
S: TryInto<T>,
impl<T, S> UniqueSaturatedInto<T> for Swhere T: Bounded, S: TryInto<T>,
source§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
Consume self to return an equivalent value of
T
.