pub struct EmptyHandler;Expand description
Empty handler used as the default registry type when no domains are needed.
CdpServer::new() creates a DomainRegistry<EmptyHandler> internally;
production code should use CdpServer::with_registry() with a concrete
handler type (e.g. DomainDispatch).
Trait Implementations§
Source§impl DomainHandler for EmptyHandler
impl DomainHandler for EmptyHandler
Source§fn domain_name(&self) -> &'static str
fn domain_name(&self) -> &'static str
Returns the CDP domain name (e.g. “Page”, “Runtime”).
Source§fn handle_command(
&self,
_: &str,
_: Value,
_: &dyn EventSender,
) -> Result<Value, CdpError>
fn handle_command( &self, _: &str, _: Value, _: &dyn EventSender, ) -> Result<Value, CdpError>
Handle a CDP command.
command is the full method string
(e.g. “Page.navigate”). params is the JSON params object.Source§fn on_session_created(&self, _session_id: &str)
fn on_session_created(&self, _session_id: &str)
Called when a session enables this domain for the first time.
Source§fn on_session_destroyed(&self, _session_id: &str)
fn on_session_destroyed(&self, _session_id: &str)
Called when a session is destroyed (while this domain was enabled).
Auto Trait Implementations§
impl Freeze for EmptyHandler
impl RefUnwindSafe for EmptyHandler
impl Send for EmptyHandler
impl Sync for EmptyHandler
impl Unpin for EmptyHandler
impl UnsafeUnpin for EmptyHandler
impl UnwindSafe for EmptyHandler
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more