pub trait EnsureOriginWithArg<OuterOrigin, Argument> {
    type Success;

    fn try_origin(
o: OuterOrigin,
a: &Argument
) -> Result<Self::Success, OuterOrigin>; fn ensure_origin(
o: OuterOrigin,
a: &Argument
) -> Result<Self::Success, BadOrigin> { ... } }
Expand description

Some sort of check on the origin is performed by this object.

Required Associated Types§

source

type Success

A return type.

Required Methods§

source

fn try_origin(o: OuterOrigin, a: &Argument) -> Result<Self::Success, OuterOrigin>

Perform the origin check, returning the origin value if unsuccessful. This allows chaining.

Provided Methods§

source

fn ensure_origin(
o: OuterOrigin,
a: &Argument
) -> Result<Self::Success, BadOrigin>

Perform the origin check.

Implementors§

source§

impl<OuterOrigin, Argument, EO: EnsureOrigin<OuterOrigin>> EnsureOriginWithArg<OuterOrigin, Argument> for AsEnsureOriginWithArg<EO>

§

type Success = <EO as EnsureOrigin<OuterOrigin>>::Success