Trait Origin

Source
pub trait Origin: Sized {
    // Required methods
    fn into_origin(self) -> H256;
    fn from_origin(val: H256) -> Self;

    // Provided method
    fn cast<T: Origin>(self) -> T { ... }
}
Expand description

NOTE: Implementation of this for u64 places bytes from idx=0.

Required Methods§

Source

fn into_origin(self) -> H256

Source

fn from_origin(val: H256) -> Self

Provided Methods§

Source

fn cast<T: Origin>(self) -> T

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.

Implementations on Foreign Types§

Source§

impl Origin for u64

Source§

impl Origin for H256

Source§

fn into_origin(self) -> H256

Source§

fn from_origin(val: H256) -> Self

Source§

impl Origin for AccountId32

Implementors§