pub trait EnsureAddressOrigin<OuterOrigin> {
type Success;
// Required method
fn try_address_origin(
address: &H160,
origin: OuterOrigin,
) -> Result<Self::Success, OuterOrigin>;
// Provided method
fn ensure_address_origin(
address: &H160,
origin: OuterOrigin,
) -> Result<Self::Success, BadOrigin> { ... }
}
Required Associated Types§
Required Methods§
Sourcefn try_address_origin(
address: &H160,
origin: OuterOrigin,
) -> Result<Self::Success, OuterOrigin>
fn try_address_origin( address: &H160, origin: OuterOrigin, ) -> Result<Self::Success, OuterOrigin>
Try with origin.
Provided Methods§
Sourcefn ensure_address_origin(
address: &H160,
origin: OuterOrigin,
) -> Result<Self::Success, BadOrigin>
fn ensure_address_origin( address: &H160, origin: OuterOrigin, ) -> Result<Self::Success, BadOrigin>
Perform the origin check.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.