pub enum CdpMessage {
Response(CdpResponse),
Event(CdpEvent),
}Expand description
An incoming CDP message (either response or event).
Variants§
Response(CdpResponse)
A response to a previous request.
Event(CdpEvent)
An event pushed by the browser.
Implementations§
Source§impl CdpMessage
impl CdpMessage
Sourcepub fn is_response_for(&self, id: u64) -> bool
pub fn is_response_for(&self, id: u64) -> bool
Check if this message is a response with the given ID.
Sourcepub fn into_response(self) -> Option<CdpResponse>
pub fn into_response(self) -> Option<CdpResponse>
Try to extract this as a response.
Sourcepub fn into_event(self) -> Option<CdpEvent>
pub fn into_event(self) -> Option<CdpEvent>
Try to extract this as an event.
Trait Implementations§
Source§impl Clone for CdpMessage
impl Clone for CdpMessage
Source§fn clone(&self) -> CdpMessage
fn clone(&self) -> CdpMessage
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CdpMessage
impl Debug for CdpMessage
Source§impl<'de> Deserialize<'de> for CdpMessage
impl<'de> Deserialize<'de> for CdpMessage
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CdpMessage
impl RefUnwindSafe for CdpMessage
impl Send for CdpMessage
impl Sync for CdpMessage
impl Unpin for CdpMessage
impl UnwindSafe for CdpMessage
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