Added `UntypedSerializedMessage`: A `SerializedMessage` whos original value type has been erased. A `SerializedMessage<V>` can be converted into this with `.into_untyped()`, and can be converted back with the `unsafe` function `into_typed<V>()`.
Untyped serialized mmessages cannot be deserialized, they must first be given a type with `into_typed<V>()`. This operation is unsafe as it may cause a potential type confusion if the message"s original `V` is different from the newly specified `V`.
Fortune for rsh's current commit: Half curse − 半凶
/// Messages of this type are not yet validated, and may be invalid/corrupt. The validation happens when converting back to a `Message<V>` (of the same `V`.)
/// Messages of this type are not yet validated, and may be invalid/corrupt. The validation happens when converting back to a `Message<V>` (of the same `V`.)
/// A type-unsafe `MessageValue` that can be used to transmute `SerializedMessage` instances.
/// A type-unsafe value that can be used to transmute `SerializedMessage` instances.
///
///
/// This operation is unsafe and can result in deserializing the `SerializedMessage` failing, or even worse, a type confusion.
/// This operation is unsafe and can result in deserializing the `SerializedMessage` failing, or even worse, a type confusion.
#[derive(Debug, Serialize, Deserialize)]
///
/// This type does not implement `MessageValue`, as serialized messages of this value cannot be created (from `Message::serialize()`), nor deserialized. They must first be converted into a typed `SerializedMessage<V>` with `UntypedSerializedMessage::into_typed<V>()`.
///
/// This is an empty (!) type.
#[derive(Debug)]
pubenumUntypedMessageValue{}
pubenumUntypedMessageValue{}
implSerializedMessage<UntypedMessageValue>
{
/// Transmute into a specifically typed `SerializedMessage`
///
/// # Safety
/// If `V` is not the original type of this message (before being untyped), then deserialisation will likely fail, or, much worse, cause a *type consufion* bug, where the object of type `V` is successfully deserialized with an invalid value from an unknown type.