Trait chromiumoxide::cdp::CustomEvent
source · pub trait CustomEvent: Any + DeserializeOwned + MethodType + Send + Sync {
// Provided method
fn from_json(event: Value) -> Result<Self, Error>
where Self: Sized + 'static { ... }
}
Expand description
This trait allows for implementing custom events that are not covered by the chrome protocol definitions.
Every CustomEvent
also requires an implementation of
chromiumoxide_types::MethodType
and it must be DeserializeOwned
(#[derive(serde::Deserialize)]
). This is necessary to identify match this
type against the provided method
identifier of a CdpEventMessage
and to properly deserialize it from a serde_json::Value
Provided Methods§
Object Safety§
This trait is not object safe.