pub trait DipCallOriginFilter<Call> {
    type Error;
    type OriginInfo;
    type Success;

    // Required method
    fn check_call_origin_info(
        call: &Call,
        info: &Self::OriginInfo
    ) -> Result<Self::Success, Self::Error>;
}
Expand description

A trait for types that implement access control logic where the call is the controlled resource and access is granted based on the provided info. The generic types are the following:

  • Call: The type of the call being checked.

Required Associated Types§

source

type Error

The error type for cases where the checks fail.

source

type OriginInfo

The type of additional information required by the type to perform the checks on the Call input.

source

type Success

The success type for cases where the checks succeed.

Required Methods§

source

fn check_call_origin_info( call: &Call, info: &Self::OriginInfo ) -> Result<Self::Success, Self::Error>

Check whether the provided call can be dispatch with the given origin information.

Implementors§