Trait cumulus_primitives_core::relay_chain::v2::EncodeAs
source · Expand description
This helper trait ensures that we can encode Statement
as CompactStatement
,
and anything as itself.
This resembles parity_scale_codec::EncodeLike
, but it’s distinct:
EncodeLike
is a marker trait which asserts at the typesystem level that
one type’s encoding is a valid encoding for another type. It doesn’t
perform any type conversion when encoding.
This trait, on the other hand, provides a method which can be used to simultaneously convert and encode one type as another.