Trait frame_support::traits::EnsureOrigin
source · pub trait EnsureOrigin<OuterOrigin> {
type Success;
// Required method
fn try_origin(o: OuterOrigin) -> Result<Self::Success, OuterOrigin>;
// Provided method
fn ensure_origin(o: OuterOrigin) -> Result<Self::Success, BadOrigin> { ... }
}
Expand description
Some sort of check on the origin is performed by this object.
Required Associated Types§
Required Methods§
sourcefn try_origin(o: OuterOrigin) -> Result<Self::Success, OuterOrigin>
fn try_origin(o: OuterOrigin) -> Result<Self::Success, OuterOrigin>
Perform the origin check.
Provided Methods§
sourcefn ensure_origin(o: OuterOrigin) -> Result<Self::Success, BadOrigin>
fn ensure_origin(o: OuterOrigin) -> Result<Self::Success, BadOrigin>
Perform the origin check.