Trait sp_runtime::traits::StaticLookup [−][src]
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
type Source: Codec + Clone + PartialEq + Debug
[src]
Type to lookup from.
type Target
[src]
Type to lookup into.
Required methods
fn lookup(s: Self::Source) -> Result<Self::Target, LookupError>
[src]
Attempt a lookup.
fn unlookup(t: Self::Target) -> Self::Source
[src]
Convert from Target back to Source.
Implementations on Foreign Types
impl<A, B> StaticLookup for (A, B) where
A: StaticLookup,
B: StaticLookup<Source = A::Source, Target = A::Target>,
[src]
A: StaticLookup,
B: StaticLookup<Source = A::Source, Target = A::Target>,
Perform a StaticLookup where there are multiple lookup sources of the same type.
type Source = A::Source
type Target = A::Target
fn lookup(x: Self::Source) -> Result<Self::Target, LookupError>
[src]
fn unlookup(x: Self::Target) -> Self::Source
[src]
Implementors
impl<AccountId, AccountIndex> StaticLookup for AccountIdLookup<AccountId, AccountIndex> where
AccountId: Codec + Clone + PartialEq + Debug,
AccountIndex: Codec + Clone + PartialEq + Debug,
MultiAddress<AccountId, AccountIndex>: Codec,
[src]
AccountId: Codec + Clone + PartialEq + Debug,
AccountIndex: Codec + Clone + PartialEq + Debug,
MultiAddress<AccountId, AccountIndex>: Codec,