Trait gclient::ext::sp_runtime::codec::CompactAs
pub trait CompactAs: From<Compact<Self>> {
type As;
// Required methods
fn encode_as(&self) -> &Self::As;
fn decode_from(_: Self::As) -> Result<Self, Error>;
}
Expand description
Allow foreign structs to be wrap in Compact
Required Associated Types§
type As
type As
A compact-encodable type that should be used as the encoding.
Required Methods§
fn decode_from(_: Self::As) -> Result<Self, Error>
fn decode_from(_: Self::As) -> Result<Self, Error>
Decode Self
from the compact-decoded type.
Object Safety§
Implementors§
source§impl CompactAs for gclient::metadata::runtime_types::sp_arithmetic::per_things::Perquintill
impl CompactAs for gclient::metadata::runtime_types::sp_arithmetic::per_things::Perquintill
§impl CompactAs for gclient::ext::sp_runtime::PerU16
impl CompactAs for gclient::ext::sp_runtime::PerU16
Implementation makes any compact encoding of PerThing::Inner
valid,
when decoding it will saturate up to PerThing::ACCURACY
.
§impl CompactAs for gclient::ext::sp_runtime::Perbill
impl CompactAs for gclient::ext::sp_runtime::Perbill
Implementation makes any compact encoding of PerThing::Inner
valid,
when decoding it will saturate up to PerThing::ACCURACY
.
§impl CompactAs for gclient::ext::sp_runtime::Percent
impl CompactAs for gclient::ext::sp_runtime::Percent
Implementation makes any compact encoding of PerThing::Inner
valid,
when decoding it will saturate up to PerThing::ACCURACY
.
§impl CompactAs for gclient::ext::sp_runtime::Permill
impl CompactAs for gclient::ext::sp_runtime::Permill
Implementation makes any compact encoding of PerThing::Inner
valid,
when decoding it will saturate up to PerThing::ACCURACY
.
§impl CompactAs for gclient::ext::sp_runtime::Perquintill
impl CompactAs for gclient::ext::sp_runtime::Perquintill
Implementation makes any compact encoding of PerThing::Inner
valid,
when decoding it will saturate up to PerThing::ACCURACY
.