pub enum WaitState {
Attached,
Visible,
Hidden,
Detached,
}Expand description
Required DOM state of a selector before the wait is satisfied.
Used with BrowserConfig::wait_selector_state and
FetchParams::wait_selector_state to control what “ready” means for the
element you are waiting on. For example, Visible is stricter than Attached
because the element must also have non-zero dimensions and not be hidden by CSS.
Variants§
Attached
The element is present in the DOM (may or may not be visible). This is the least restrictive state and the default.
Visible
The element is present in the DOM and visible on screen.
“Visible” means the element has non-zero bounding box dimensions and is not
hidden via display: none, visibility: hidden, or opacity: 0.
Hidden
The element is present in the DOM but not visible. Useful when you need to wait for an element to be hidden (e.g. a loading spinner disappearing).
Detached
The element has been removed from the DOM entirely. Useful when you need to wait for a transient element (e.g. a modal overlay) to go away before capturing the page content.
Trait Implementations§
impl Copy for WaitState
impl Eq for WaitState
impl StructuralPartialEq for WaitState
Auto Trait Implementations§
impl Freeze for WaitState
impl RefUnwindSafe for WaitState
impl Send for WaitState
impl Sync for WaitState
impl Unpin for WaitState
impl UnsafeUnpin for WaitState
impl UnwindSafe for WaitState
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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