Trait frame_support::pallet_prelude::Encode
pub trait Encode {
// Provided methods
fn size_hint(&self) -> usize { ... }
fn encode_to<T>(&self, dest: &mut T)
where T: Output + ?Sized { ... }
fn encode(&self) -> Vec<u8> ⓘ { ... }
fn using_encoded<R, F>(&self, f: F) -> R
where F: FnOnce(&[u8]) -> R { ... }
fn encoded_size(&self) -> usize { ... }
}
Expand description
Trait that allows zero-copy write of value-references to slices in LE format.
Implementations should override using_encoded
for value types and encode_to
and size_hint
for allocating types.
Wrapper types should override all methods.
Provided Methods§
fn size_hint(&self) -> usize
fn size_hint(&self) -> usize
If possible give a hint of expected size of the encoding.
This method is used inside default implementation of encode
to avoid re-allocations.
fn encode_to<T>(&self, dest: &mut T)where
T: Output + ?Sized,
fn encode_to<T>(&self, dest: &mut T)where
T: Output + ?Sized,
Convert self to a slice and append it to the destination.
fn using_encoded<R, F>(&self, f: F) -> R
fn using_encoded<R, F>(&self, f: F) -> R
Convert self to a slice and then invoke the given closure with it.
fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Calculates the encoded size.
Should be used when the encoded data isn’t required.
§Note
This works by using a special [Output
] that only tracks the size. So, there are no allocations inside the
output. However, this can not prevent allocations that some types are doing inside their own encoding.
Object Safety§
Implementations on Foreign Types§
source§impl Encode for ArithmeticError
impl Encode for ArithmeticError
source§impl Encode for DeriveJunction
impl Encode for DeriveJunction
source§impl Encode for LogLevelFilter
impl Encode for LogLevelFilter
impl Encode for Void
source§impl Encode for HttpRequestStatus
impl Encode for HttpRequestStatus
source§impl Encode for StorageKind
impl Encode for StorageKind
source§impl Encode for EcdsaVerifyError
impl Encode for EcdsaVerifyError
source§impl Encode for StorageEntryModifierIR
impl Encode for StorageEntryModifierIR
source§impl Encode for StorageHasherIR
impl Encode for StorageHasherIR
source§impl Encode for ExtrinsicInclusionMode
impl Encode for ExtrinsicInclusionMode
source§impl Encode for MultiSignature
impl Encode for MultiSignature
source§impl Encode for MultiSigner
impl Encode for MultiSigner
source§impl Encode for TokenError
impl Encode for TokenError
source§impl Encode for TransactionalError
impl Encode for TransactionalError
source§impl Encode for DispatchError
impl Encode for DispatchError
source§impl Encode for StateVersion
impl Encode for StateVersion
source§impl Encode for StorageProofError
impl Encode for StorageProofError
source§impl Encode for ReturnValue
impl Encode for ReturnValue
source§impl Encode for ReturnValue
impl Encode for ReturnValue
source§impl Encode for Public
impl Encode for Public
fn size_hint(&self) -> usize
fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)where
__CodecOutputEdqy: Output + ?Sized,
fn encode(&self) -> Vec<u8> ⓘ
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
source§impl Encode for Signature
impl Encode for Signature
fn size_hint(&self) -> usize
fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)where
__CodecOutputEdqy: Output + ?Sized,
fn encode(&self) -> Vec<u8> ⓘ
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
source§impl Encode for Public
impl Encode for Public
fn size_hint(&self) -> usize
fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)where
__CodecOutputEdqy: Output + ?Sized,
fn encode(&self) -> Vec<u8> ⓘ
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
source§impl Encode for Signature
impl Encode for Signature
fn size_hint(&self) -> usize
fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)where
__CodecOutputEdqy: Output + ?Sized,
fn encode(&self) -> Vec<u8> ⓘ
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
source§impl Encode for Public
impl Encode for Public
fn size_hint(&self) -> usize
fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)where
__CodecOutputEdqy: Output + ?Sized,
fn encode(&self) -> Vec<u8> ⓘ
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
source§impl Encode for Signature
impl Encode for Signature
fn size_hint(&self) -> usize
fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)where
__CodecOutputEdqy: Output + ?Sized,
fn encode(&self) -> Vec<u8> ⓘ
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
source§impl Encode for Public
impl Encode for Public
fn size_hint(&self) -> usize
fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)where
__CodecOutputEdqy: Output + ?Sized,
fn encode(&self) -> Vec<u8> ⓘ
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
source§impl Encode for Signature
impl Encode for Signature
fn size_hint(&self) -> usize
fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)where
__CodecOutputEdqy: Output + ?Sized,
fn encode(&self) -> Vec<u8> ⓘ
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
source§impl Encode for Public
impl Encode for Public
fn size_hint(&self) -> usize
fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)where
__CodecOutputEdqy: Output + ?Sized,
fn encode(&self) -> Vec<u8> ⓘ
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
source§impl Encode for Signature
impl Encode for Signature
fn size_hint(&self) -> usize
fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)where
__CodecOutputEdqy: Output + ?Sized,
fn encode(&self) -> Vec<u8> ⓘ
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
source§impl Encode for Public
impl Encode for Public
fn size_hint(&self) -> usize
fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)where
__CodecOutputEdqy: Output + ?Sized,
fn encode(&self) -> Vec<u8> ⓘ
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
source§impl Encode for Signature
impl Encode for Signature
fn size_hint(&self) -> usize
fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)where
__CodecOutputEdqy: Output + ?Sized,
fn encode(&self) -> Vec<u8> ⓘ
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
source§impl Encode for BigUint
impl Encode for BigUint
fn size_hint(&self) -> usize
fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)where
__CodecOutputEdqy: Output + ?Sized,
fn encode(&self) -> Vec<u8> ⓘ
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
source§impl Encode for FixedI64
impl Encode for FixedI64
fn size_hint(&self) -> usize
fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)where
__CodecOutputEdqy: Output + ?Sized,
fn encode(&self) -> Vec<u8> ⓘ
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
source§impl Encode for FixedI128
impl Encode for FixedI128
fn size_hint(&self) -> usize
fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)where
__CodecOutputEdqy: Output + ?Sized,
fn encode(&self) -> Vec<u8> ⓘ
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
source§impl Encode for FixedU64
impl Encode for FixedU64
fn size_hint(&self) -> usize
fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)where
__CodecOutputEdqy: Output + ?Sized,
fn encode(&self) -> Vec<u8> ⓘ
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
source§impl Encode for FixedU128
impl Encode for FixedU128
fn size_hint(&self) -> usize
fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)where
__CodecOutputEdqy: Output + ?Sized,
fn encode(&self) -> Vec<u8> ⓘ
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
source§impl Encode for PerU16
impl Encode for PerU16
fn size_hint(&self) -> usize
fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)where
__CodecOutputEdqy: Output + ?Sized,
fn encode(&self) -> Vec<u8> ⓘ
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
source§impl Encode for Perbill
impl Encode for Perbill
fn size_hint(&self) -> usize
fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)where
__CodecOutputEdqy: Output + ?Sized,
fn encode(&self) -> Vec<u8> ⓘ
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
source§impl Encode for Percent
impl Encode for Percent
fn size_hint(&self) -> usize
fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)where
__CodecOutputEdqy: Output + ?Sized,
fn encode(&self) -> Vec<u8> ⓘ
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
source§impl Encode for Permill
impl Encode for Permill
fn size_hint(&self) -> usize
fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)where
__CodecOutputEdqy: Output + ?Sized,
fn encode(&self) -> Vec<u8> ⓘ
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
source§impl Encode for Perquintill
impl Encode for Perquintill
fn size_hint(&self) -> usize
fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)where
__CodecOutputEdqy: Output + ?Sized,
fn encode(&self) -> Vec<u8> ⓘ
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
source§impl Encode for RingVrfSignature
impl Encode for RingVrfSignature
source§impl Encode for VrfSignature
impl Encode for VrfSignature
source§impl Encode for AccountId32
impl Encode for AccountId32
fn size_hint(&self) -> usize
fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)where
__CodecOutputEdqy: Output + ?Sized,
fn encode(&self) -> Vec<u8> ⓘ
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
source§impl Encode for CryptoTypeId
impl Encode for CryptoTypeId
fn size_hint(&self) -> usize
fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)where
__CodecOutputEdqy: Output + ?Sized,
fn encode(&self) -> Vec<u8> ⓘ
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
source§impl Encode for KeyTypeId
impl Encode for KeyTypeId
fn size_hint(&self) -> usize
fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)where
__CodecOutputEdqy: Output + ?Sized,
fn encode(&self) -> Vec<u8> ⓘ
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
source§impl Encode for Duration
impl Encode for Duration
fn size_hint(&self) -> usize
fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)where
__CodecOutputEdqy: Output + ?Sized,
fn encode(&self) -> Vec<u8> ⓘ
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
source§impl Encode for HttpRequestId
impl Encode for HttpRequestId
fn size_hint(&self) -> usize
fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)where
__CodecOutputEdqy: Output + ?Sized,
fn encode(&self) -> Vec<u8> ⓘ
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
source§impl Encode for OpaqueMultiaddr
impl Encode for OpaqueMultiaddr
fn size_hint(&self) -> usize
fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)where
__CodecOutputEdqy: Output + ?Sized,
fn encode(&self) -> Vec<u8> ⓘ
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
source§impl Encode for OpaqueNetworkState
impl Encode for OpaqueNetworkState
source§impl Encode for Timestamp
impl Encode for Timestamp
fn size_hint(&self) -> usize
fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)where
__CodecOutputEdqy: Output + ?Sized,
fn encode(&self) -> Vec<u8> ⓘ
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
source§impl Encode for VrfSignature
impl Encode for VrfSignature
source§impl Encode for OpaqueMetadata
impl Encode for OpaqueMetadata
fn size_hint(&self) -> usize
fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)where
__CodecOutputEdqy: Output + ?Sized,
fn encode(&self) -> Vec<u8> ⓘ
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
source§impl Encode for OpaquePeerId
impl Encode for OpaquePeerId
fn size_hint(&self) -> usize
fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)where
__CodecOutputEdqy: Output + ?Sized,
fn encode(&self) -> Vec<u8> ⓘ
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
source§impl Encode for MultiRemovalResults
impl Encode for MultiRemovalResults
source§impl Encode for Digest
impl Encode for Digest
fn size_hint(&self) -> usize
fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)where
__CodecOutputEdqy: Output + ?Sized,
fn encode(&self) -> Vec<u8> ⓘ
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
source§impl Encode for ModuleError
impl Encode for ModuleError
source§impl Encode for Time
impl Encode for Time
fn size_hint(&self) -> usize
fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)where
__CodecOutputEdqy: Output + ?Sized,
fn encode(&self) -> Vec<u8> ⓘ
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
source§impl Encode for AnySignature
impl Encode for AnySignature
fn size_hint(&self) -> usize
fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)where
__CodecOutputEdqy: Output + ?Sized,
fn encode(&self) -> Vec<u8> ⓘ
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
source§impl Encode for Justifications
impl Encode for Justifications
fn size_hint(&self) -> usize
fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)where
__CodecOutputEdqy: Output + ?Sized,
fn encode(&self) -> Vec<u8> ⓘ
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
source§impl Encode for ModuleError
impl Encode for ModuleError
source§impl Encode for OpaqueExtrinsic
impl Encode for OpaqueExtrinsic
fn size_hint(&self) -> usize
fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)where
__CodecOutputEdqy: Output + ?Sized,
fn encode(&self) -> Vec<u8> ⓘ
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
source§impl Encode for OpaqueValue
impl Encode for OpaqueValue
fn size_hint(&self) -> usize
fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)where
__CodecOutputEdqy: Output + ?Sized,
fn encode(&self) -> Vec<u8> ⓘ
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
source§impl Encode for MockCallU64
impl Encode for MockCallU64
fn size_hint(&self) -> usize
fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)where
__CodecOutputEdqy: Output + ?Sized,
fn encode(&self) -> Vec<u8> ⓘ
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
source§impl Encode for TestSignature
impl Encode for TestSignature
source§impl Encode for UintAuthorityId
impl Encode for UintAuthorityId
fn size_hint(&self) -> usize
fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)where
__CodecOutputEdqy: Output + ?Sized,
fn encode(&self) -> Vec<u8> ⓘ
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
source§impl Encode for LookupError
impl Encode for LookupError
source§impl Encode for OffenceSeverity
impl Encode for OffenceSeverity
fn size_hint(&self) -> usize
fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)where
__CodecOutputEdqy: Output + ?Sized,
fn encode(&self) -> Vec<u8> ⓘ
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
source§impl Encode for ChildTrieParentKeyId
impl Encode for ChildTrieParentKeyId
fn size_hint(&self) -> usize
fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)where
__CodecOutputEdqy: Output + ?Sized,
fn encode(&self) -> Vec<u8> ⓘ
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
source§impl Encode for ChildTrieParentKeyId
impl Encode for ChildTrieParentKeyId
fn size_hint(&self) -> usize
fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)where
__CodecOutputEdqy: Output + ?Sized,
fn encode(&self) -> Vec<u8> ⓘ
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
source§impl Encode for StorageData
impl Encode for StorageData
fn size_hint(&self) -> usize
fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)where
__CodecOutputEdqy: Output + ?Sized,
fn encode(&self) -> Vec<u8> ⓘ
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
source§impl Encode for StorageData
impl Encode for StorageData
fn size_hint(&self) -> usize
fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)where
__CodecOutputEdqy: Output + ?Sized,
fn encode(&self) -> Vec<u8> ⓘ
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
source§impl Encode for StorageKey
impl Encode for StorageKey
fn size_hint(&self) -> usize
fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)where
__CodecOutputEdqy: Output + ?Sized,
fn encode(&self) -> Vec<u8> ⓘ
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
source§impl Encode for StorageKey
impl Encode for StorageKey
fn size_hint(&self) -> usize
fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)where
__CodecOutputEdqy: Output + ?Sized,
fn encode(&self) -> Vec<u8> ⓘ
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
source§impl Encode for TrackedStorageKey
impl Encode for TrackedStorageKey
source§impl Encode for WasmEntryAttributes
impl Encode for WasmEntryAttributes
source§impl Encode for WasmEntryAttributes
impl Encode for WasmEntryAttributes
source§impl Encode for WasmFieldName
impl Encode for WasmFieldName
fn size_hint(&self) -> usize
fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)where
__CodecOutputEdqy: Output + ?Sized,
fn encode(&self) -> Vec<u8> ⓘ
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
source§impl Encode for WasmFieldName
impl Encode for WasmFieldName
fn size_hint(&self) -> usize
fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)where
__CodecOutputEdqy: Output + ?Sized,
fn encode(&self) -> Vec<u8> ⓘ
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
source§impl Encode for WasmFields
impl Encode for WasmFields
fn size_hint(&self) -> usize
fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)where
__CodecOutputEdqy: Output + ?Sized,
fn encode(&self) -> Vec<u8> ⓘ
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
source§impl Encode for WasmFields
impl Encode for WasmFields
fn size_hint(&self) -> usize
fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)where
__CodecOutputEdqy: Output + ?Sized,
fn encode(&self) -> Vec<u8> ⓘ
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
source§impl Encode for WasmMetadata
impl Encode for WasmMetadata
source§impl Encode for WasmMetadata
impl Encode for WasmMetadata
source§impl Encode for WasmValuesSet
impl Encode for WasmValuesSet
fn size_hint(&self) -> usize
fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)where
__CodecOutputEdqy: Output + ?Sized,
fn encode(&self) -> Vec<u8> ⓘ
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
source§impl Encode for WasmValuesSet
impl Encode for WasmValuesSet
fn size_hint(&self) -> usize
fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)where
__CodecOutputEdqy: Output + ?Sized,
fn encode(&self) -> Vec<u8> ⓘ
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
source§impl Encode for CompactProof
impl Encode for CompactProof
fn size_hint(&self) -> usize
fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)where
__CodecOutputEdqy: Output + ?Sized,
fn encode(&self) -> Vec<u8> ⓘ
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
source§impl Encode for StorageProof
impl Encode for StorageProof
fn size_hint(&self) -> usize
fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)where
__CodecOutputEdqy: Output + ?Sized,
fn encode(&self) -> Vec<u8> ⓘ
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
source§impl Encode for RuntimeVersion
impl Encode for RuntimeVersion
§impl Encode for OpaqueMetadata
impl Encode for OpaqueMetadata
fn size_hint(&self) -> usize
fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)where
__CodecOutputEdqy: Output + ?Sized,
fn encode(&self) -> Vec<u8> ⓘ
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
§impl Encode for PortableRegistry
impl Encode for PortableRegistry
fn size_hint(&self) -> usize
fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)where
__CodecOutputEdqy: Output + ?Sized,
fn encode(&self) -> Vec<u8> ⓘ
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
§impl<A0, B0, C0, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0> Encode for (A0, B0, C0, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0)
impl<A0, B0, C0, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0> Encode for (A0, B0, C0, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0)
source§impl<AccountId, AccountIndex> Encode for MultiAddress<AccountId, AccountIndex>where
AccountId: Encode,
AccountIndex: HasCompact,
impl<AccountId, AccountIndex> Encode for MultiAddress<AccountId, AccountIndex>where
AccountId: Encode,
AccountIndex: HasCompact,
source§impl<AccountId, Balance> Encode for ExposurePage<AccountId, Balance>
impl<AccountId, Balance> Encode for ExposurePage<AccountId, Balance>
source§impl<AccountId, Balance> Encode for IndividualExposure<AccountId, Balance>where
Balance: HasCompact,
AccountId: Encode,
impl<AccountId, Balance> Encode for IndividualExposure<AccountId, Balance>where
Balance: HasCompact,
AccountId: Encode,
source§impl<Address, Call, Signature, Extension> Encode for UncheckedExtrinsic<Address, Call, Signature, Extension>
impl<Address, Call, Signature, Extension> Encode for UncheckedExtrinsic<Address, Call, Signature, Extension>
§impl<B0, C0, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0> Encode for (B0, C0, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0)
impl<B0, C0, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0> Encode for (B0, C0, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0)
source§impl<B> Encode for BlockAndTimeDeadline<B>
impl<B> Encode for BlockAndTimeDeadline<B>
source§impl<Balance> Encode for PagedExposureMetadata<Balance>where
Balance: HasCompact + MaxEncodedLen,
impl<Balance> Encode for PagedExposureMetadata<Balance>where
Balance: HasCompact + MaxEncodedLen,
source§impl<Block> Encode for SignedBlock<Block>where
Block: Encode,
impl<Block> Encode for SignedBlock<Block>where
Block: Encode,
§impl<C0, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0> Encode for (C0, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0)
impl<C0, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0> Encode for (C0, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0)
source§impl<Call, Extension> Encode for SignedPayload<Call, Extension>
impl<Call, Extension> Encode for SignedPayload<Call, Extension>
source§fn using_encoded<R, F>(&self, f: F) -> R
fn using_encoded<R, F>(&self, f: F) -> R
Get an encoded version of this blake2_256
-hashed payload.