1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::{CodecFrom, TopDecodeMulti, TopEncodeMulti};

/// Signals that we can safely serialize `Self` in order to obtain a `T` on the other size.
pub trait CodecInto<T>: TopEncodeMulti
where
    T: TopDecodeMulti,
{
}

impl<F, I> CodecInto<F> for I
where
    I: TopEncodeMulti,
    F: CodecFrom<I>,
{
}