referrerpolicy=no-referrer-when-downgrade

Trait polkadot_sdk_frame::traits::Convert

pub trait Convert<A, B> {
    // Required method
    fn convert(a: A) -> B;
}
Expand description

Infallible conversion trait. Generic over both source and destination types.

Required Methods§

fn convert(a: A) -> B

Make conversion.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

§

impl<A, B> Convert<A, B> for ()
where B: Default,

§

fn convert(_: A) -> B

Implementors§

§

impl<A, B> Convert<A, B> for ConvertInto
where A: Into<B>,

§

impl<AssetId> Convert<NativeOrWithId<AssetId>, Either<(), AssetId>> for NativeFromLeft
where AssetId: Ord,

§

impl<Base, Slope, Balance> Convert<Footprint, Balance> for LinearStoragePrice<Base, Slope, Balance>
where Base: Get<Balance>, Slope: Get<Balance>, Balance: From<u64> + Saturating,

§

impl<T> Convert<T, T> for Identity

§

impl<X, Y, T> Convert<X, Y> for ConvertToValue<T>
where T: Get<Y>,