Trait sp_runtime::traits::StaticLookup
source · [−]pub trait StaticLookup {
type Source: Codec + Clone + PartialEq + Debug;
type Target;
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.
Associated Types
Required methods
Implementations on Foreign Types
sourceimpl<A, B> StaticLookup for (A, B) where
A: StaticLookup,
B: StaticLookup<Source = A::Source, Target = A::Target>,
impl<A, B> StaticLookup for (A, B) where
A: StaticLookup,
B: StaticLookup<Source = A::Source, Target = A::Target>,
Perform a StaticLookup where there are multiple lookup sources of the same type.