Skip to main content

OverlayClient

Struct OverlayClient 

Source
pub struct OverlayClient { /* private fields */ }
Expand description

Client for Overlay domain commands.

Implementations§

Source§

impl OverlayClient

Source

pub async fn disable(&self, session_id: Option<&str>) -> Result<Value, CdpError>

Disables domain notifications.

Source

pub async fn enable(&self, session_id: Option<&str>) -> Result<Value, CdpError>

Enables domain notifications.

Source

pub async fn get_highlight_object_for_test( &self, params: GetHighlightObjectForTestParams, session_id: Option<&str>, ) -> Result<GetHighlightObjectForTestReturns, CdpError>

For testing.

Source

pub async fn get_grid_highlight_objects_for_test( &self, params: GetGridHighlightObjectsForTestParams, session_id: Option<&str>, ) -> Result<GetGridHighlightObjectsForTestReturns, CdpError>

For Persistent Grid testing.

Source

pub async fn get_source_order_highlight_object_for_test( &self, params: GetSourceOrderHighlightObjectForTestParams, session_id: Option<&str>, ) -> Result<GetSourceOrderHighlightObjectForTestReturns, CdpError>

For Source Order Viewer testing.

Source

pub async fn hide_highlight( &self, session_id: Option<&str>, ) -> Result<Value, CdpError>

Hides any highlight.

Source

pub async fn highlight_frame( &self, params: HighlightFrameParams, session_id: Option<&str>, ) -> Result<Value, CdpError>

Highlights owner element of the frame with given id. Deprecated: Doesn’t work reliably and cannot be fixed due to process separation (the owner node might be in a different process). Determine the owner node in the client and use highlightNode.

Source

pub async fn highlight_node( &self, params: HighlightNodeParams, session_id: Option<&str>, ) -> Result<Value, CdpError>

Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or objectId must be specified.

Source

pub async fn highlight_quad( &self, params: HighlightQuadParams, session_id: Option<&str>, ) -> Result<Value, CdpError>

Highlights given quad. Coordinates are absolute with respect to the main frame viewport.

Source

pub async fn highlight_rect( &self, params: HighlightRectParams, session_id: Option<&str>, ) -> Result<Value, CdpError>

Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport. Issue: the method does not handle device pixel ratio (DPR) correctly. The coordinates currently have to be adjusted by the client if DPR is not 1 (see crbug.com/437807128).

Source

pub async fn highlight_source_order( &self, params: HighlightSourceOrderParams, session_id: Option<&str>, ) -> Result<Value, CdpError>

Highlights the source order of the children of the DOM node with given id or with the given JavaScript object wrapper. Either nodeId or objectId must be specified.

Source

pub async fn set_inspect_mode( &self, params: SetInspectModeParams, session_id: Option<&str>, ) -> Result<Value, CdpError>

Enters the ‘inspect’ mode. In this mode, elements that user is hovering over are highlighted. Backend then generates ‘inspectNodeRequested’ event upon element selection.

Source

pub async fn set_show_ad_highlights( &self, params: SetShowAdHighlightsParams, session_id: Option<&str>, ) -> Result<Value, CdpError>

Highlights owner element of all frames detected to be ads.

Source

pub async fn set_paused_in_debugger_message( &self, params: SetPausedInDebuggerMessageParams, session_id: Option<&str>, ) -> Result<Value, CdpError>

Source

pub async fn set_show_debug_borders( &self, params: SetShowDebugBordersParams, session_id: Option<&str>, ) -> Result<Value, CdpError>

Requests that backend shows debug borders on layers

Source

pub async fn set_show_fps_counter( &self, params: SetShowFpsCounterParams, session_id: Option<&str>, ) -> Result<Value, CdpError>

Requests that backend shows the FPS counter

Source

pub async fn set_show_grid_overlays( &self, params: SetShowGridOverlaysParams, session_id: Option<&str>, ) -> Result<Value, CdpError>

Highlight multiple elements with the CSS Grid overlay.

Source

pub async fn set_show_flex_overlays( &self, params: SetShowFlexOverlaysParams, session_id: Option<&str>, ) -> Result<Value, CdpError>

Source

pub async fn set_show_scroll_snap_overlays( &self, params: SetShowScrollSnapOverlaysParams, session_id: Option<&str>, ) -> Result<Value, CdpError>

Source

pub async fn set_show_container_query_overlays( &self, params: SetShowContainerQueryOverlaysParams, session_id: Option<&str>, ) -> Result<Value, CdpError>

Source

pub async fn set_show_paint_rects( &self, params: SetShowPaintRectsParams, session_id: Option<&str>, ) -> Result<Value, CdpError>

Requests that backend shows paint rectangles

Source

pub async fn set_show_layout_shift_regions( &self, params: SetShowLayoutShiftRegionsParams, session_id: Option<&str>, ) -> Result<Value, CdpError>

Requests that backend shows layout shift regions

Source

pub async fn set_show_scroll_bottleneck_rects( &self, params: SetShowScrollBottleneckRectsParams, session_id: Option<&str>, ) -> Result<Value, CdpError>

Requests that backend shows scroll bottleneck rects

Source

pub async fn set_show_hit_test_borders( &self, params: SetShowHitTestBordersParams, session_id: Option<&str>, ) -> Result<Value, CdpError>

Deprecated, no longer has any effect.

Source

pub async fn set_show_web_vitals( &self, params: SetShowWebVitalsParams, session_id: Option<&str>, ) -> Result<Value, CdpError>

Deprecated, no longer has any effect.

Source

pub async fn set_show_viewport_size_on_resize( &self, params: SetShowViewportSizeOnResizeParams, session_id: Option<&str>, ) -> Result<Value, CdpError>

Paints viewport size upon main frame resize.

Source

pub async fn set_show_hinge( &self, params: SetShowHingeParams, session_id: Option<&str>, ) -> Result<Value, CdpError>

Add a dual screen device hinge

Source

pub async fn set_show_isolated_elements( &self, params: SetShowIsolatedElementsParams, session_id: Option<&str>, ) -> Result<Value, CdpError>

Show elements in isolation mode with overlays.

Source

pub async fn set_show_window_controls_overlay( &self, params: SetShowWindowControlsOverlayParams, session_id: Option<&str>, ) -> Result<Value, CdpError>

Show Window Controls Overlay for PWA

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more