pub struct CommandMessage<T = Result<Response>> {
pub method: MethodId,
pub session_id: Option<SessionId>,
pub params: Value,
pub sender: Sender<T>,
}Expand description
Messages used internally to communicate with the connection, which is executed in the the background task.
Fields§
§method: MethodId§session_id: Option<SessionId>§params: Value§sender: Sender<T>Implementations§
Source§impl<T> CommandMessage<T>
impl<T> CommandMessage<T>
pub fn new<C: Command>(cmd: C, sender: OneshotSender<T>) -> Result<Self>
Whether this command is a navigation
pub fn with_session<C: Command>( cmd: C, sender: OneshotSender<T>, session_id: Option<SessionId>, ) -> Result<Self>
pub fn split(self) -> (Request, OneshotSender<T>)
Trait Implementations§
Source§impl<T: Debug> Debug for CommandMessage<T>
impl<T: Debug> Debug for CommandMessage<T>
Source§impl Method for CommandMessage
impl Method for CommandMessage
Source§fn identifier(&self) -> MethodId
fn identifier(&self) -> MethodId
The whole string identifier for this method like:
DOM.removeNodeSource§fn domain_name(&self) -> Cow<'static, str>
fn domain_name(&self) -> Cow<'static, str>
The name of the domain this method belongs to:
DOMSource§fn method_name(&self) -> Cow<'static, str>
fn method_name(&self) -> Cow<'static, str>
The standalone identifier of the method inside the domain:
removeNodeAuto Trait Implementations§
impl<T> Freeze for CommandMessage<T>
impl<T = Result<Response, CdpError>> !RefUnwindSafe for CommandMessage<T>
impl<T> Send for CommandMessage<T>where
T: Send,
impl<T> Sync for CommandMessage<T>where
T: Send,
impl<T> Unpin for CommandMessage<T>
impl<T = Result<Response, CdpError>> !UnwindSafe for CommandMessage<T>
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