pub struct ScrollbarMotion { /* private fields */ }Expand description
Motion tokens used by Scrollbar.
Base installs no motion of its own: every transition duration defaults to
zero, so visibility and thumb width snap. Product timing belongs to the
styled layer, which projects it through crate::ScrollbarTheme.
Implementations§
Source§impl ScrollbarMotion
impl ScrollbarMotion
Sourcepub fn with_idle(self, idle: Duration) -> ScrollbarMotion
pub fn with_idle(self, idle: Duration) -> ScrollbarMotion
How long visibility is held after the last scroll, drag, or hover.
Sourcepub fn with_enter(self, enter: Duration) -> ScrollbarMotion
pub fn with_enter(self, enter: Duration) -> ScrollbarMotion
How long the scrollbar takes to become fully visible.
Sourcepub fn with_exit(self, exit: Duration) -> ScrollbarMotion
pub fn with_exit(self, exit: Duration) -> ScrollbarMotion
How long the scrollbar takes to fade away once the idle hold expires.
Sourcepub fn with_expand(self, expand: Duration) -> ScrollbarMotion
pub fn with_expand(self, expand: Duration) -> ScrollbarMotion
How long the thumb takes to reach a new width.
Sourcepub fn with_entrance(self, entrance: ScrollbarEntrance) -> ScrollbarMotion
pub fn with_entrance(self, entrance: ScrollbarEntrance) -> ScrollbarMotion
Which entrance choreography to play.
Sourcepub fn with_thumb_hover_entrance(
self,
entrance: ScrollbarEntrance,
) -> ScrollbarMotion
pub fn with_thumb_hover_entrance( self, entrance: ScrollbarEntrance, ) -> ScrollbarMotion
Which entrance choreography to play when hover reveals the thumb.
pub fn idle(&self) -> Duration
pub fn enter(&self) -> Duration
pub fn exit(&self) -> Duration
pub fn expand(&self) -> Duration
pub fn entrance(&self) -> ScrollbarEntrance
pub fn thumb_hover_entrance(&self) -> ScrollbarEntrance
Trait Implementations§
Source§impl Clone for ScrollbarMotion
impl Clone for ScrollbarMotion
Source§fn clone(&self) -> ScrollbarMotion
fn clone(&self) -> ScrollbarMotion
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ScrollbarMotion
Source§impl Debug for ScrollbarMotion
impl Debug for ScrollbarMotion
Source§impl Default for ScrollbarMotion
impl Default for ScrollbarMotion
Source§fn default() -> ScrollbarMotion
fn default() -> ScrollbarMotion
Returns the “default value” for a type. Read more
Source§impl PartialEq for ScrollbarMotion
impl PartialEq for ScrollbarMotion
impl StructuralPartialEq for ScrollbarMotion
Auto Trait Implementations§
impl Freeze for ScrollbarMotion
impl RefUnwindSafe for ScrollbarMotion
impl Send for ScrollbarMotion
impl Sync for ScrollbarMotion
impl Unpin for ScrollbarMotion
impl UnsafeUnpin for ScrollbarMotion
impl UnwindSafe for ScrollbarMotion
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().