pub struct MetadataIR<T: Form = MetaForm> {
    pub pallets: Vec<PalletMetadataIR<T>>,
    pub extrinsic: ExtrinsicMetadataIR<T>,
    pub ty: T::Type,
    pub apis: Vec<RuntimeApiMetadataIR<T>>,
    pub outer_enums: OuterEnumsIR<T>,
}
Expand description

The intermediate representation for the runtime metadata. Contains the needed context that allows conversion to multiple metadata versions.

Note

Further fields could be added or removed to ensure proper conversion. When the IR does not contain enough information to generate a specific version of the runtime metadata an appropriate default value is used (ie, empty vector).

Fields§

§pallets: Vec<PalletMetadataIR<T>>

Pallet metadata.

§extrinsic: ExtrinsicMetadataIR<T>

Metadata of the extrinsic.

§ty: T::Type

The type of the Runtime.

§apis: Vec<RuntimeApiMetadataIR<T>>

Metadata of the Runtime API.

§outer_enums: OuterEnumsIR<T>

The outer enums types as found in the runtime.

Trait Implementations§

source§

impl From<MetadataIR<MetaForm>> for RuntimeMetadataV14

source§

fn from(ir: MetadataIR) -> Self

Converts to this type from the input type.
source§

impl From<MetadataIR<MetaForm>> for RuntimeMetadataV15

source§

fn from(ir: MetadataIR) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<T> RefUnwindSafe for MetadataIR<T>where <T as Form>::String: RefUnwindSafe, <T as Form>::Type: RefUnwindSafe,

§

impl<T> Send for MetadataIR<T>where <T as Form>::String: Send, <T as Form>::Type: Send,

§

impl<T> Sync for MetadataIR<T>where <T as Form>::String: Sync, <T as Form>::Type: Sync,

§

impl<T> Unpin for MetadataIR<T>where <T as Form>::String: Unpin, <T as Form>::Type: Unpin,

§

impl<T> UnwindSafe for MetadataIR<T>where <T as Form>::String: UnwindSafe, <T as Form>::Type: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> JsonSchemaMaybe for T