Add test binned json
This commit is contained in:
@@ -49,7 +49,7 @@ impl ToJsonBytes for serde_json::Value {
|
||||
}
|
||||
}
|
||||
|
||||
pub trait Collected: fmt::Debug + ToJsonResult + AsAnyRef + Send {}
|
||||
pub trait Collected: fmt::Debug + Send + AsAnyRef + WithLen + ToJsonResult {}
|
||||
|
||||
erased_serde::serialize_trait_object!(Collected);
|
||||
|
||||
@@ -59,6 +59,12 @@ impl ToJsonResult for Box<dyn Collected> {
|
||||
}
|
||||
}
|
||||
|
||||
impl WithLen for Box<dyn Collected> {
|
||||
fn len(&self) -> usize {
|
||||
self.as_ref().len()
|
||||
}
|
||||
}
|
||||
|
||||
impl Collected for Box<dyn Collected> {}
|
||||
|
||||
// TODO rename to `Typed`
|
||||
|
||||
Reference in New Issue
Block a user