pub fn upcast<T, U>(value: T) -> Uwhere
T: Upcast<U> + DefaultEncoding,
<T as DefaultEncoding>::Encoding: MessageEncode<T, Resource>,
U: DefaultEncoding,
<U as DefaultEncoding>::Encoding: for<'a> MessageDecode<'a, U, Resource>,
Expand description
Converts a message from one type to another, where the destination type’s encoding is a superset of the source type’s.