pub fn upcast<T, U>(value: T) -> Uwhere
T: Upcast<U> + DefaultEncoding,
T::Encoding: MessageEncode<T, Resource>,
U: DefaultEncoding,
U::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.