pub trait ErasedWireValue:
Debug
+ Send
+ Sync
+ 'static {
// Required methods
fn type_id(&self) -> WireTypeId;
fn as_any(&self) -> &dyn Any;
}Expand description
Object-safe view over WireValue.
Codec implementations work in terms of &dyn ErasedWireValue so
they can be invoked through &dyn WireCodec without becoming
generic. The blanket impl below makes the conversion implicit at
call sites: any &T where T: WireValue coerces to
&dyn ErasedWireValue.
Required Methods§
Sourcefn type_id(&self) -> WireTypeId
fn type_id(&self) -> WireTypeId
The wire type id of the underlying concrete value.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".