Trait polkadot_service::runtime_traits::StaticLookup
source · pub trait StaticLookup {
type Source: Codec + Clone + PartialEq + Debug + TypeInfo;
type Target;
// Required methods
fn lookup(s: Self::Source) -> Result<Self::Target, LookupError>;
fn unlookup(t: Self::Target) -> Self::Source;
}
Expand description
Means of changing one type into another in a manner dependent on the source type.
This variant is different to Lookup
in that it doesn’t (can cannot) require any
context.
Required Associated Types§
Required Methods§
Object Safety§
This trait is not object safe.
Implementations on Foreign Types§
source§impl<A, B> StaticLookup for (A, B)where
A: StaticLookup,
B: StaticLookup<Source = <A as StaticLookup>::Source, Target = <A as StaticLookup>::Target>,
impl<A, B> StaticLookup for (A, B)where
A: StaticLookup,
B: StaticLookup<Source = <A as StaticLookup>::Source, Target = <A as StaticLookup>::Target>,
Perform a StaticLookup where there are multiple lookup sources of the same type.