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§
sourcetype OriginInfo
type OriginInfo
The type of additional information required by the type to perform the
checks on the Call
input.
Required Methods§
sourcefn check_call_origin_info(
call: &Call,
info: &Self::OriginInfo
) -> Result<Self::Success, Self::Error>
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.