Trait frame_support::traits::EnsureOrigin [−][src]
pub trait EnsureOrigin<OuterOrigin> { type Success; fn try_origin(o: OuterOrigin) -> Result<Self::Success, OuterOrigin>; fn successful_origin() -> OuterOrigin; fn ensure_origin(o: OuterOrigin) -> Result<Self::Success, BadOrigin> { ... } }
Expand description
Some sort of check on the origin is performed by this object.
Associated Types
Required methods
fn try_origin(o: OuterOrigin) -> Result<Self::Success, OuterOrigin>
fn try_origin(o: OuterOrigin) -> Result<Self::Success, OuterOrigin>
Perform the origin check.
fn successful_origin() -> OuterOrigin
fn successful_origin() -> OuterOrigin
Returns an outer origin capable of passing try_origin
check.
** Should be used for benchmarking only!!! **
Provided methods
fn ensure_origin(o: OuterOrigin) -> Result<Self::Success, BadOrigin>
fn ensure_origin(o: OuterOrigin) -> Result<Self::Success, BadOrigin>
Perform the origin check.