pub struct UseElementVisibilityOptions<El, T>{ /* private fields */ }
Expand description
Options for use_element_visibility_with_options
.
Implementations§
Source§impl<El, T> UseElementVisibilityOptions<El, T>
impl<El, T> UseElementVisibilityOptions<El, T>
Sourcepub fn viewport<New__El, New__T>(
self,
value: Option<New__El>,
) -> UseElementVisibilityOptions<New__El, New__T>
pub fn viewport<New__El, New__T>( self, value: Option<New__El>, ) -> UseElementVisibilityOptions<New__El, New__T>
A web_sys::Element
or web_sys::Document
object which is an ancestor of the intended target
,
whose bounding rectangle will be considered the viewport.
Any part of the target not visible in the visible area of the root
is not considered visible.
Defaults to None
(which means the root document
will be used).
Please note that setting this to a Some(document)
may not be supported by all browsers.
See Browser Compatibility
Trait Implementations§
Auto Trait Implementations§
impl<El, T> Freeze for UseElementVisibilityOptions<El, T>where
El: Freeze,
impl<El, T> RefUnwindSafe for UseElementVisibilityOptions<El, T>where
El: RefUnwindSafe,
T: RefUnwindSafe,
impl<El, T> Send for UseElementVisibilityOptions<El, T>
impl<El, T> Sync for UseElementVisibilityOptions<El, T>
impl<El, T> Unpin for UseElementVisibilityOptions<El, T>
impl<El, T> UnwindSafe for UseElementVisibilityOptions<El, T>where
El: UnwindSafe,
T: UnwindSafe,
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> 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>
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