mattsse / chromiumoxide

Chrome Devtools Protocol rust API
Apache License 2.0
712 stars 69 forks source link

Add CdpEvent::InvalidParams variant #207

Open ryo33 opened 4 months ago

ryo33 commented 4 months ago

Fixes #167

Add CdpEvent::InvalidParams(serde_json::Value), and use it if deserializing an event param for a specific method fails. There already are CdpEvent::Other(serde_json::Value), but it's only used for unknown method ids.

I use the raw_value feature on serde_json to get serde_json::Value without any allocation after deserializing an event param failed.