Struct frontier_template_runtime::RuntimeOrigin
source · pub struct RuntimeOrigin {
pub caller: OriginCaller,
/* 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
].
Fields§
§caller: OriginCaller
Implementations§
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<RawOrigin<<Runtime as Config>::AccountId>> for RuntimeOrigin
impl From<RawOrigin<<Runtime as Config>::AccountId>> for RuntimeOrigin
source§impl From<RawOrigin> for RuntimeOrigin
impl From<RawOrigin> for RuntimeOrigin
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 From<RuntimeOrigin> for Result<Origin, RuntimeOrigin>
impl From<RuntimeOrigin> for Result<Origin, 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 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::1fig::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 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
.§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.§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.§fn as_system_ref(&self) -> Option<&RawOrigin<Self::AccountId>>
fn as_system_ref(&self) -> Option<&RawOrigin<Self::AccountId>>
Extract a reference to the sytsem origin, if that’s what the caller is.
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CheckedConversion for T
impl<T> CheckedConversion for T
§fn checked_from<T>(t: T) -> Option<Self>where
Self: TryFrom<T>,
fn checked_from<T>(t: T) -> Option<Self>where
Self: TryFrom<T>,
§fn checked_into<T>(self) -> Option<T>where
Self: TryInto<T>,
fn checked_into<T>(self) -> Option<T>where
Self: TryInto<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>
§impl<T> IsType<T> for T
impl<T> IsType<T> for T
§impl<T, Outer> IsWrappedBy<Outer> for T
impl<T, Outer> IsWrappedBy<Outer> for T
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
§fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
§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<T, U> TryIntoKey<U> for Twhere
U: TryFromKey<T>,
impl<T, U> TryIntoKey<U> for Twhere
U: TryFromKey<T>,
type Error = <U as TryFromKey<T>>::Error
fn try_into_key(self) -> Result<U, <U as TryFromKey<T>>::Error>
§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
The counterpart to
unchecked_from
.§impl<T, S> UniqueSaturatedInto<T> for S
impl<T, S> UniqueSaturatedInto<T> for S
§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
Consume self to return an equivalent value of
T
.