pub struct Element<'a> { /* private fields */ }Expand description
Represents a DOM element controlled via CDP.
Implementations§
Source§impl<'a> Element<'a>
impl<'a> Element<'a>
Sourcepub async fn screenshot(&self) -> Result<String>
pub async fn screenshot(&self) -> Result<String>
Captures a JPEG screenshot of the element with default quality.
Sourcepub async fn raw_screenshot(&self) -> Result<String>
pub async fn raw_screenshot(&self) -> Result<String>
Captures a raw PNG screenshot of the element.
Sourcepub async fn screenshot_with_options(
&self,
opts: CaptureOptions,
) -> Result<String>
pub async fn screenshot_with_options( &self, opts: CaptureOptions, ) -> Result<String>
Sourcepub fn backend_node_id(&self) -> u64
pub fn backend_node_id(&self) -> u64
Returns the backend node ID of this element.
Auto Trait Implementations§
impl<'a> Freeze for Element<'a>
impl<'a> RefUnwindSafe for Element<'a>
impl<'a> Send for Element<'a>
impl<'a> Sync for Element<'a>
impl<'a> Unpin for Element<'a>
impl<'a> UnwindSafe for Element<'a>
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more