This commit is contained in:
Dominik Werder
2024-09-06 19:08:54 +02:00
parent de4569d686
commit f5909ea03c
23 changed files with 818 additions and 301 deletions

View File

@@ -50,7 +50,7 @@ impl ToJsonBytes for serde_json::Value {
}
}
pub trait Collected: fmt::Debug + Send + AsAnyRef + WithLen + ToJsonResult {}
pub trait Collected: fmt::Debug + TypeName + Send + AsAnyRef + WithLen + ToJsonResult {}
erased_serde::serialize_trait_object!(Collected);
@@ -66,6 +66,12 @@ impl WithLen for Box<dyn Collected> {
}
}
impl TypeName for Box<dyn Collected> {
fn type_name(&self) -> String {
self.as_ref().type_name()
}
}
impl Collected for Box<dyn Collected> {}
// TODO rename to `Typed`

View File

@@ -258,7 +258,7 @@ impl ByteEstimate for EnumVariant {
impl AsPrimF32 for EnumVariant {
fn as_prim_f32_b(&self) -> f32 {
0.
self.ix() as f32
}
}