Trait frame_support::dispatch::EncodeLike [−]
Expand description
A marker trait that tells the compiler that a type encode to the same representation as another type.
E.g. Vec<u8>
has the same encoded representation as &[u8]
.
Example
fn encode_like<T: Encode, R: EncodeLike<T>>(data: &R) { data.encode(); // Valid `T` encoded value. } fn main() { // Just pass the a reference to the normal tuple. encode_like::<(u32, u32), _>(&(1u32, 2u32)); // Pass a tuple of references encode_like::<(u32, u32), _>(&(&1u32, &2u32)); // Pass a tuple of a reference and a value. encode_like::<(u32, u32), _>(&(&1u32, 2u32)); }
Warning
The relation is not symetric, T
implements EncodeLike<U>
does not mean U
has same
representation as T
.
For instance we could imaging a non zero integer to be encoded to the same representation as
the said integer but not the other way around.
Limitation
Not all possible implementations of EncodeLike are implemented (for instance Box<Box<u32>>
does not implement EncodeLike<u32>
). To bypass this issue either open a PR to add the new
combination or use Ref
reference wrapper or define your own wrapper
and implement EncodeLike
on it as such:
fn encode_like<T: Encode, R: EncodeLike<T>>(data: &R) { data.encode(); // Valid `T` encoded value. } struct MyWrapper<'a>(&'a (Box<Box<u32>>, u32)); impl<'a> core::ops::Deref for MyWrapper<'a> { // Or use derive_deref crate type Target = (Box<Box<u32>>, u32); fn deref(&self) -> &Self::Target { &self.0 } } impl<'a> parity_scale_codec::WrapperTypeEncode for MyWrapper<'a> {} impl<'a> parity_scale_codec::EncodeLike<(u32, u32)> for MyWrapper<'a> {} fn main() { let v = (Box::new(Box::new(0)), 0); encode_like::<(u32, u32), _>(&MyWrapper(&v)); }
Implementations on Foreign Types
impl<T> EncodeLike<T> for Arc<T> where
T: Encode,
impl<L0, L1, M0, M1, N0, N1, O0, O1, P0, P1, Q0, Q1, R0, R1> EncodeLike<(L1, M1, N1, O1, P1, Q1, R1)> for (L0, M0, N0, O0, P0, Q0, R0) where
L0: EncodeLike<L1>,
M0: EncodeLike<M1>,
N0: EncodeLike<N1>,
O0: EncodeLike<O1>,
P0: EncodeLike<P1>,
Q0: EncodeLike<Q1>,
R0: EncodeLike<R1>,
L1: Encode,
M1: Encode,
N1: Encode,
O1: Encode,
P1: Encode,
Q1: Encode,
R1: Encode,
impl<P0, P1, Q0, Q1, R0, R1> EncodeLike<(P1, Q1, R1)> for (P0, Q0, R0) where
P0: EncodeLike<P1>,
Q0: EncodeLike<Q1>,
R0: EncodeLike<R1>,
P1: Encode,
Q1: Encode,
R1: Encode,
impl<'_> EncodeLike<String> for &'_ str
impl<K0, K1, L0, L1, M0, M1, N0, N1, O0, O1, P0, P1, Q0, Q1, R0, R1> EncodeLike<(K1, L1, M1, N1, O1, P1, Q1, R1)> for (K0, L0, M0, N0, O0, P0, Q0, R0) where
K1: Encode,
K0: EncodeLike<K1>,
L0: EncodeLike<L1>,
M0: EncodeLike<M1>,
N0: EncodeLike<N1>,
O0: EncodeLike<O1>,
P0: EncodeLike<P1>,
Q0: EncodeLike<Q1>,
R0: EncodeLike<R1>,
L1: Encode,
M1: Encode,
N1: Encode,
O1: Encode,
P1: Encode,
Q1: Encode,
R1: Encode,
impl<D0, D1, E0, E1, F0, F1, G0, G1, H0, H1, I0, I1, J0, J1, K0, K1, L0, L1, M0, M1, N0, N1, O0, O1, P0, P1, Q0, Q1, R0, R1> EncodeLike<(D1, E1, F1, G1, H1, I1, J1, K1, L1, M1, N1, O1, P1, Q1, R1)> for (D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) where
K1: Encode,
I1: Encode,
G1: Encode,
G0: EncodeLike<G1>,
D0: EncodeLike<D1>,
E0: EncodeLike<E1>,
F0: EncodeLike<F1>,
H0: EncodeLike<H1>,
I0: EncodeLike<I1>,
J0: EncodeLike<J1>,
K0: EncodeLike<K1>,
L0: EncodeLike<L1>,
M0: EncodeLike<M1>,
N0: EncodeLike<N1>,
O0: EncodeLike<O1>,
P0: EncodeLike<P1>,
Q0: EncodeLike<Q1>,
R0: EncodeLike<R1>,
D1: Encode,
E1: Encode,
F1: Encode,
H1: Encode,
J1: Encode,
L1: Encode,
M1: Encode,
N1: Encode,
O1: Encode,
P1: Encode,
Q1: Encode,
R1: Encode,
impl EncodeLike<Duration> for Duration
impl<'_, T, LikeT> EncodeLike<&'_ [(LikeT,)]> for BinaryHeap<T> where
T: EncodeLike<LikeT>,
LikeT: Encode,
impl<'_, T> EncodeLike<&'_ mut T> for &'_ mut T where
T: Encode + ?Sized,
impl<C0, C1, D0, D1, E0, E1, F0, F1, G0, G1, H0, H1, I0, I1, J0, J1, K0, K1, L0, L1, M0, M1, N0, N1, O0, O1, P0, P1, Q0, Q1, R0, R1> EncodeLike<(C1, D1, E1, F1, G1, H1, I1, J1, K1, L1, M1, N1, O1, P1, Q1, R1)> for (C0, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) where
K1: Encode,
I1: Encode,
G1: Encode,
G0: EncodeLike<G1>,
C0: EncodeLike<C1>,
D0: EncodeLike<D1>,
E0: EncodeLike<E1>,
F0: EncodeLike<F1>,
H0: EncodeLike<H1>,
I0: EncodeLike<I1>,
J0: EncodeLike<J1>,
K0: EncodeLike<K1>,
L0: EncodeLike<L1>,
M0: EncodeLike<M1>,
N0: EncodeLike<N1>,
O0: EncodeLike<O1>,
P0: EncodeLike<P1>,
Q0: EncodeLike<Q1>,
R0: EncodeLike<R1>,
C1: Encode,
D1: Encode,
E1: Encode,
F1: Encode,
H1: Encode,
J1: Encode,
L1: Encode,
M1: Encode,
N1: Encode,
O1: Encode,
P1: Encode,
Q1: Encode,
R1: Encode,
impl EncodeLike<()> for ()
impl EncodeLike<i8> for i8
impl EncodeLike<bool> for bool
impl<'_, T> EncodeLike<T> for &'_ T where
T: Encode,
impl<'_, T, U> EncodeLike<&'_ [U]> for VecDeque<T> where
T: EncodeLike<U>,
U: Encode,
impl<T, LikeT> EncodeLike<BinaryHeap<LikeT>> for BinaryHeap<T> where
T: EncodeLike<LikeT>,
LikeT: Encode,
impl EncodeLike<u64> for u64
impl<A0, A1, B0, B1, C0, C1, D0, D1, E0, E1, F0, F1, G0, G1, H0, H1, I0, I1, J0, J1, K0, K1, L0, L1, M0, M1, N0, N1, O0, O1, P0, P1, Q0, Q1, R0, R1> EncodeLike<(A1, B1, C1, D1, E1, F1, G1, H1, I1, J1, K1, L1, M1, N1, O1, P1, Q1, R1)> for (A0, B0, C0, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) where
K1: Encode,
I1: Encode,
B0: EncodeLike<B1>,
B1: Encode,
G1: Encode,
G0: EncodeLike<G1>,
A0: EncodeLike<A1>,
C0: EncodeLike<C1>,
D0: EncodeLike<D1>,
E0: EncodeLike<E1>,
F0: EncodeLike<F1>,
H0: EncodeLike<H1>,
I0: EncodeLike<I1>,
J0: EncodeLike<J1>,
K0: EncodeLike<K1>,
L0: EncodeLike<L1>,
M0: EncodeLike<M1>,
N0: EncodeLike<N1>,
O0: EncodeLike<O1>,
P0: EncodeLike<P1>,
Q0: EncodeLike<Q1>,
R0: EncodeLike<R1>,
A1: Encode,
C1: Encode,
D1: Encode,
E1: Encode,
F1: Encode,
H1: Encode,
J1: Encode,
L1: Encode,
M1: Encode,
N1: Encode,
O1: Encode,
P1: Encode,
Q1: Encode,
R1: Encode,
impl<'a, '_, T, U> EncodeLike<U> for &'_ Ref<'a, T, U> where
T: EncodeLike<U>,
U: Encode,
impl<'_, T, U> EncodeLike<Vec<U, Global>> for &'_ [T] where
T: EncodeLike<U>,
U: Encode,
impl<'_, '_, T> EncodeLike<T> for &'_ &'_ T where
T: Encode,
impl<'_, T, LikeT> EncodeLike<&'_ [(LikeT,)]> for BTreeSet<T> where
T: EncodeLike<LikeT>,
LikeT: Encode,
impl<'a, T, U> EncodeLike<U> for Ref<'a, T, U> where
T: EncodeLike<U>,
U: Encode,
impl<T> EncodeLike<Rc<T>> for Rc<T> where
T: Encode + ?Sized,
impl EncodeLike<OptionBool> for OptionBool
impl<T> EncodeLike<Arc<T>> for Arc<T> where
T: Encode + ?Sized,
impl EncodeLike<u8> for u8
impl<'_, T> EncodeLike<T> for &'_ mut T where
T: Encode,
impl<'_> EncodeLike<&'_ str> for String
impl<T, LikeT> EncodeLike<LinkedList<LikeT>> for LinkedList<T> where
T: EncodeLike<LikeT>,
LikeT: Encode,
impl<'_, T, LikeT> EncodeLike<BinaryHeap<LikeT>> for &'_ [(T,)] where
T: EncodeLike<LikeT>,
LikeT: Encode,
impl<'_, T, LikeT> EncodeLike<&'_ [(LikeT,)]> for LinkedList<T> where
T: EncodeLike<LikeT>,
LikeT: Encode,
impl EncodeLike<i128> for i128
impl<T> EncodeLike<T> for Rc<T> where
T: Encode,
impl<'_, T, LikeT> EncodeLike<BTreeSet<LikeT>> for &'_ [(T,)] where
T: EncodeLike<LikeT>,
LikeT: Encode,
impl<'_, K, LikeK, V, LikeV> EncodeLike<BTreeMap<LikeK, LikeV>> for &'_ [(K, V)] where
K: EncodeLike<LikeK>,
V: EncodeLike<LikeV>,
LikeK: Encode,
LikeV: Encode,
impl<O0, O1, P0, P1, Q0, Q1, R0, R1> EncodeLike<(O1, P1, Q1, R1)> for (O0, P0, Q0, R0) where
O0: EncodeLike<O1>,
P0: EncodeLike<P1>,
Q0: EncodeLike<Q1>,
R0: EncodeLike<R1>,
O1: Encode,
P1: Encode,
Q1: Encode,
R1: Encode,
impl<T, U, const N: usize> EncodeLike<[U; N]> for [T; N] where
T: EncodeLike<U>,
U: Encode,
impl<K, LikeK, V, LikeV> EncodeLike<BTreeMap<LikeK, LikeV>> for BTreeMap<K, V> where
K: EncodeLike<LikeK>,
V: EncodeLike<LikeV>,
LikeK: Encode,
LikeV: Encode,
impl<T> EncodeLike<VecDeque<T>> for VecDeque<T> where
T: Encode,
impl<T, U> EncodeLike<Option<U>> for Option<T> where
T: EncodeLike<U>,
U: Encode,
impl<T, U> EncodeLike<Vec<U, Global>> for VecDeque<T> where
T: EncodeLike<U>,
U: Encode,
impl<J0, J1, K0, K1, L0, L1, M0, M1, N0, N1, O0, O1, P0, P1, Q0, Q1, R0, R1> EncodeLike<(J1, K1, L1, M1, N1, O1, P1, Q1, R1)> for (J0, K0, L0, M0, N0, O0, P0, Q0, R0) where
K1: Encode,
J0: EncodeLike<J1>,
K0: EncodeLike<K1>,
L0: EncodeLike<L1>,
M0: EncodeLike<M1>,
N0: EncodeLike<N1>,
O0: EncodeLike<O1>,
P0: EncodeLike<P1>,
Q0: EncodeLike<Q1>,
R0: EncodeLike<R1>,
J1: Encode,
L1: Encode,
M1: Encode,
N1: Encode,
O1: Encode,
P1: Encode,
Q1: Encode,
R1: Encode,
impl<G0, G1, H0, H1, I0, I1, J0, J1, K0, K1, L0, L1, M0, M1, N0, N1, O0, O1, P0, P1, Q0, Q1, R0, R1> EncodeLike<(G1, H1, I1, J1, K1, L1, M1, N1, O1, P1, Q1, R1)> for (G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) where
K1: Encode,
I1: Encode,
G1: Encode,
G0: EncodeLike<G1>,
H0: EncodeLike<H1>,
I0: EncodeLike<I1>,
J0: EncodeLike<J1>,
K0: EncodeLike<K1>,
L0: EncodeLike<L1>,
M0: EncodeLike<M1>,
N0: EncodeLike<N1>,
O0: EncodeLike<O1>,
P0: EncodeLike<P1>,
Q0: EncodeLike<Q1>,
R0: EncodeLike<R1>,
H1: Encode,
J1: Encode,
L1: Encode,
M1: Encode,
N1: Encode,
O1: Encode,
P1: Encode,
Q1: Encode,
R1: Encode,
impl EncodeLike<u128> for u128
impl<E0, E1, F0, F1, G0, G1, H0, H1, I0, I1, J0, J1, K0, K1, L0, L1, M0, M1, N0, N1, O0, O1, P0, P1, Q0, Q1, R0, R1> EncodeLike<(E1, F1, G1, H1, I1, J1, K1, L1, M1, N1, O1, P1, Q1, R1)> for (E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) where
K1: Encode,
I1: Encode,
G1: Encode,
G0: EncodeLike<G1>,
E0: EncodeLike<E1>,
F0: EncodeLike<F1>,
H0: EncodeLike<H1>,
I0: EncodeLike<I1>,
J0: EncodeLike<J1>,
K0: EncodeLike<K1>,
L0: EncodeLike<L1>,
M0: EncodeLike<M1>,
N0: EncodeLike<N1>,
O0: EncodeLike<O1>,
P0: EncodeLike<P1>,
Q0: EncodeLike<Q1>,
R0: EncodeLike<R1>,
E1: Encode,
F1: Encode,
H1: Encode,
J1: Encode,
L1: Encode,
M1: Encode,
N1: Encode,
O1: Encode,
P1: Encode,
Q1: Encode,
R1: Encode,
impl<'a, T> EncodeLike<T> for Cow<'a, T> where
T: ToOwned + Encode,
impl<F0, F1, G0, G1, H0, H1, I0, I1, J0, J1, K0, K1, L0, L1, M0, M1, N0, N1, O0, O1, P0, P1, Q0, Q1, R0, R1> EncodeLike<(F1, G1, H1, I1, J1, K1, L1, M1, N1, O1, P1, Q1, R1)> for (F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) where
K1: Encode,
I1: Encode,
G1: Encode,
G0: EncodeLike<G1>,
F0: EncodeLike<F1>,
H0: EncodeLike<H1>,
I0: EncodeLike<I1>,
J0: EncodeLike<J1>,
K0: EncodeLike<K1>,
L0: EncodeLike<L1>,
M0: EncodeLike<M1>,
N0: EncodeLike<N1>,
O0: EncodeLike<O1>,
P0: EncodeLike<P1>,
Q0: EncodeLike<Q1>,
R0: EncodeLike<R1>,
F1: Encode,
H1: Encode,
J1: Encode,
L1: Encode,
M1: Encode,
N1: Encode,
O1: Encode,
P1: Encode,
Q1: Encode,
R1: Encode,
impl<'_, T> EncodeLike<&'_ T> for &'_ T where
T: Encode + ?Sized,
impl<I0, I1, J0, J1, K0, K1, L0, L1, M0, M1, N0, N1, O0, O1, P0, P1, Q0, Q1, R0, R1> EncodeLike<(I1, J1, K1, L1, M1, N1, O1, P1, Q1, R1)> for (I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) where
K1: Encode,
I1: Encode,
I0: EncodeLike<I1>,
J0: EncodeLike<J1>,
K0: EncodeLike<K1>,
L0: EncodeLike<L1>,
M0: EncodeLike<M1>,
N0: EncodeLike<N1>,
O0: EncodeLike<O1>,
P0: EncodeLike<P1>,
Q0: EncodeLike<Q1>,
R0: EncodeLike<R1>,
J1: Encode,
L1: Encode,
M1: Encode,
N1: Encode,
O1: Encode,
P1: Encode,
Q1: Encode,
R1: Encode,
impl<B0, B1, C0, C1, D0, D1, E0, E1, F0, F1, G0, G1, H0, H1, I0, I1, J0, J1, K0, K1, L0, L1, M0, M1, N0, N1, O0, O1, P0, P1, Q0, Q1, R0, R1> EncodeLike<(B1, C1, D1, E1, F1, G1, H1, I1, J1, K1, L1, M1, N1, O1, P1, Q1, R1)> for (B0, C0, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) where
K1: Encode,
I1: Encode,
B0: EncodeLike<B1>,
B1: Encode,
G1: Encode,
G0: EncodeLike<G1>,
C0: EncodeLike<C1>,
D0: EncodeLike<D1>,
E0: EncodeLike<E1>,
F0: EncodeLike<F1>,
H0: EncodeLike<H1>,
I0: EncodeLike<I1>,
J0: EncodeLike<J1>,
K0: EncodeLike<K1>,
L0: EncodeLike<L1>,
M0: EncodeLike<M1>,
N0: EncodeLike<N1>,
O0: EncodeLike<O1>,
P0: EncodeLike<P1>,
Q0: EncodeLike<Q1>,
R0: EncodeLike<R1>,
C1: Encode,
D1: Encode,
E1: Encode,
F1: Encode,
H1: Encode,
J1: Encode,
L1: Encode,
M1: Encode,
N1: Encode,
O1: Encode,
P1: Encode,
Q1: Encode,
R1: Encode,
impl<'_, T, LikeT> EncodeLike<LinkedList<LikeT>> for &'_ [(T,)] where
T: EncodeLike<LikeT>,
LikeT: Encode,
impl<T> EncodeLike<T> for Box<T, Global> where
T: Encode,
impl<T> EncodeLike<Compact<T>> for Compact<T> where
CompactRef<'a, T>: for<'a> Encode,
impl<Q0, Q1, R0, R1> EncodeLike<(Q1, R1)> for (Q0, R0) where
Q0: EncodeLike<Q1>,
R0: EncodeLike<R1>,
Q1: Encode,
R1: Encode,
impl<'_, K, LikeK, V, LikeV> EncodeLike<&'_ [(LikeK, LikeV)]> for BTreeMap<K, V> where
K: EncodeLike<LikeK>,
V: EncodeLike<LikeV>,
LikeK: Encode,
LikeV: Encode,
impl<N0, N1, O0, O1, P0, P1, Q0, Q1, R0, R1> EncodeLike<(N1, O1, P1, Q1, R1)> for (N0, O0, P0, Q0, R0) where
N0: EncodeLike<N1>,
O0: EncodeLike<O1>,
P0: EncodeLike<P1>,
Q0: EncodeLike<Q1>,
R0: EncodeLike<R1>,
N1: Encode,
O1: Encode,
P1: Encode,
Q1: Encode,
R1: Encode,
impl<'_, T, U> EncodeLike<VecDeque<U>> for &'_ [T] where
T: EncodeLike<U>,
U: Encode,
impl EncodeLike<i32> for i32
impl EncodeLike<String> for String
impl<T, LikeT> EncodeLike<BTreeSet<LikeT>> for BTreeSet<T> where
T: EncodeLike<LikeT>,
LikeT: Encode,
impl EncodeLike<i16> for i16
impl EncodeLike<i64> for i64
impl EncodeLike<u32> for u32
impl<M0, M1, N0, N1, O0, O1, P0, P1, Q0, Q1, R0, R1> EncodeLike<(M1, N1, O1, P1, Q1, R1)> for (M0, N0, O0, P0, Q0, R0) where
M0: EncodeLike<M1>,
N0: EncodeLike<N1>,
O0: EncodeLike<O1>,
P0: EncodeLike<P1>,
Q0: EncodeLike<Q1>,
R0: EncodeLike<R1>,
M1: Encode,
N1: Encode,
O1: Encode,
P1: Encode,
Q1: Encode,
R1: Encode,
impl<R0, R1> EncodeLike<(R1,)> for (R0,) where
R0: EncodeLike<R1>,
R1: Encode,
impl EncodeLike<u16> for u16
impl<H0, H1, I0, I1, J0, J1, K0, K1, L0, L1, M0, M1, N0, N1, O0, O1, P0, P1, Q0, Q1, R0, R1> EncodeLike<(H1, I1, J1, K1, L1, M1, N1, O1, P1, Q1, R1)> for (H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0) where
K1: Encode,
I1: Encode,
H0: EncodeLike<H1>,
I0: EncodeLike<I1>,
J0: EncodeLike<J1>,
K0: EncodeLike<K1>,
L0: EncodeLike<L1>,
M0: EncodeLike<M1>,
N0: EncodeLike<N1>,
O0: EncodeLike<O1>,
P0: EncodeLike<P1>,
Q0: EncodeLike<Q1>,
R0: EncodeLike<R1>,
H1: Encode,
J1: Encode,
L1: Encode,
M1: Encode,
N1: Encode,
O1: Encode,
P1: Encode,
Q1: Encode,
R1: Encode,
impl EncodeLike<H128> for H128
impl EncodeLike<U128> for U128
impl EncodeLike<H512> for H512
impl EncodeLike<U256> for U256
impl EncodeLike<H256> for H256
impl EncodeLike<U512> for U512
impl EncodeLike<H160> for H160
impl<Address, Call, Signature, Extra> EncodeLike<UncheckedExtrinsic<Address, Call, Signature, Extra>> for UncheckedExtrinsic<Address, Call, Signature, Extra> where
Call: Encode,
Extra: SignedExtension,
Address: Encode,
Signature: Encode,
impl<Number, Hash> EncodeLike<Header<Number, Hash>> for Header<Number, Hash> where
Hash: Hash,
Number: Copy + Into<U256> + TryFrom<U256> + HasCompact,
<Hash as Hash>::Output: Encode,
Digest<<Hash as Hash>::Output>: Encode,
impl<Info> EncodeLike<DispatchErrorWithPostInfo<Info>> for DispatchErrorWithPostInfo<Info> where
Info: Eq + PartialEq<Info> + Clone + Copy + Encode + Decode + Printable,
impl<AccountId, AccountIndex> EncodeLike<MultiAddress<AccountId, AccountIndex>> for MultiAddress<AccountId, AccountIndex> where
AccountId: Encode,
AccountIndex: HasCompact,
impl<'a, Hash> EncodeLike<DigestItemRef<'a, Hash>> for DigestItemRef<'a, Hash> where
Hash: Encode,
impl<Call, Extra> EncodeLike<TestXt<Call, Extra>> for TestXt<Call, Extra> where
Call: Encode,
Option<(u64, Extra)>: Encode,
impl<Header, Extrinsic> EncodeLike<Block<Header, Extrinsic>> for Block<Header, Extrinsic> where
Extrinsic: MaybeSerialize,
Header: Encode,
Vec<Extrinsic, Global>: Encode,
impl<Call, Extra> EncodeLike<SignedPayload<Call, Extra>> for SignedPayload<Call, Extra> where
Call: Encode,
Extra: SignedExtension,
impl<Hash> EncodeLike<Digest<Hash>> for Digest<Hash> where
Vec<DigestItem<Hash>, Global>: Encode,
impl<B> EncodeLike<BlockAndTimeDeadline<B>> for BlockAndTimeDeadline<B> where
B: BlockNumberProvider,
<B as BlockNumberProvider>::BlockNumber: Encode,
impl<Reporter, Offender> EncodeLike<OffenceDetails<Reporter, Offender>> for OffenceDetails<Reporter, Offender> where
Offender: Encode,
Vec<Reporter, Global>: Encode,
Implementors
impl<'_, '_, T> EncodeLike<&'_ &'_ T> for T where
T: Encode,
impl<'_, T> EncodeLike<&'_ T> for T where
T: Encode,
impl<'_, T> EncodeLike<&'_ mut T> for T where
T: Encode,
impl<'_, T, U> EncodeLike<&'_ [U]> for Vec<T, Global> where
T: EncodeLike<U>,
U: Encode,
impl<'a, T> EncodeLike<Cow<'a, T>> for T where
T: ToOwned + Encode,
impl<'a, T, S> EncodeLike<BoundedSlice<'a, T, S>> for BoundedSlice<'a, T, S> where
T: Encode,
&'a [T]: Encode,
PhantomData<S>: Encode,
PhantomData<S>: Encode,
impl<'a, T: Encode + Decode, S: Get<u32>> EncodeLike<BoundedVec<T, S>> for BoundedSlice<'a, T, S>
impl<'a, T: Encode + Decode, S: Get<u32>> EncodeLike<Vec<T, Global>> for BoundedSlice<'a, T, S>
impl<B, O> EncodeLike<DecodeDifferent<B, O>> for DecodeDifferent<B, O> where
O: Encode + 'static,
B: Encode + 'static,
impl<Balance> EncodeLike<WeightToFeeCoefficient<Balance>> for WeightToFeeCoefficient<Balance> where
Balance: Encode,
Balance: Encode,
impl<BlockNumber> EncodeLike<DispatchTime<BlockNumber>> for DispatchTime<BlockNumber> where
BlockNumber: Encode,
BlockNumber: Encode,
BlockNumber: Encode,
BlockNumber: Encode,
impl<K, V, S> EncodeLike<BoundedBTreeMap<K, V, S>> for BoundedBTreeMap<K, V, S> where
BTreeMap<K, V>: Encode,
BTreeMap<K, V>: Encode,
PhantomData<S>: Encode,
PhantomData<S>: Encode,
impl<K, V, S> EncodeLike<BTreeMap<K, V>> for BoundedBTreeMap<K, V, S> where
BTreeMap<K, V>: Encode,
impl<T> EncodeLike<PhantomData<T>> for PhantomData<T>
impl<T> EncodeLike<PerDispatchClass<T>> for PerDispatchClass<T> where
T: Encode,
T: Encode,
T: Encode,
T: Encode,
T: Encode,
T: Encode,
impl<T> EncodeLike<Box<T, Global>> for T where
T: Encode,
impl<T> EncodeLike<Rc<T>> for T where
T: Encode,
impl<T> EncodeLike<Arc<T>> for T where
T: Encode,
impl<T, LikeT, E, LikeE> EncodeLike<Result<LikeT, LikeE>> for Result<T, E> where
T: EncodeLike<LikeT>,
E: EncodeLike<LikeE>,
LikeT: Encode,
LikeE: Encode,
impl<T, S> EncodeLike<BoundedBTreeSet<T, S>> for BoundedBTreeSet<T, S> where
BTreeSet<T>: Encode,
BTreeSet<T>: Encode,
PhantomData<S>: Encode,
PhantomData<S>: Encode,
impl<T, S> EncodeLike<BoundedVec<T, S>> for BoundedVec<T, S> where
Vec<T>: Encode,
Vec<T>: Encode,
PhantomData<S>: Encode,
PhantomData<S>: Encode,
impl<T, S> EncodeLike<WeakBoundedVec<T, S>> for WeakBoundedVec<T, S> where
Vec<T>: Encode,
Vec<T>: Encode,
PhantomData<S>: Encode,
PhantomData<S>: Encode,
impl<T, U> EncodeLike<VecDeque<U>> for Vec<T, Global> where
T: EncodeLike<U>,
U: Encode,
impl<T, U> EncodeLike<Vec<U, Global>> for Vec<T, Global> where
T: EncodeLike<U>,
U: Encode,