Function mesh::upcast::force_downcast
source · pub fn force_downcast<T, U>(value: T) -> Result<U, Error>where
U: Upcast<T> + DefaultEncoding,
T: DefaultEncoding,
<T as DefaultEncoding>::Encoding: MessageEncode<T, Resource>,
<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 subset of the source type’s.