pub struct PopupTokens { /* private fields */ }Expand description
The crate’s policy for floating surfaces.
Implementations§
Source§impl PopupTokens
impl PopupTokens
Sourcepub const DEFAULT: Self
pub const DEFAULT: Self
The crate’s default: open below with a smart flip, and show a hover surface almost at once.
Upstream waits 600ms before a hover card appears, which reads as the data being fetched rather than revealed. A hover surface over data the application already holds should feel like a disclosure, so the default is the quick tempo’s own delay.
Sourcepub fn set(self, cx: &mut App)
pub fn set(self, cx: &mut App)
Makes this policy the application’s, for every floating surface.
Sourcepub const fn hover_open_delay(&self) -> Duration
pub const fn hover_open_delay(&self) -> Duration
How long a pointer rests before a hover surface opens.
Sourcepub const fn hover_close_delay(&self) -> Duration
pub const fn hover_close_delay(&self) -> Duration
How long a hover surface waits before closing.
Sourcepub const fn with_hover_open_delay(self, delay: Duration) -> Self
pub const fn with_hover_open_delay(self, delay: Duration) -> Self
Replaces the hover_open_delay.
Sourcepub const fn with_hover_close_delay(self, delay: Duration) -> Self
pub const fn with_hover_close_delay(self, delay: Duration) -> Self
Replaces the hover_close_delay.
Trait Implementations§
Source§impl Clone for PopupTokens
impl Clone for PopupTokens
Source§fn clone(&self) -> PopupTokens
fn clone(&self) -> PopupTokens
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 PopupTokens
Source§impl Debug for PopupTokens
impl Debug for PopupTokens
Source§impl Default for PopupTokens
impl Default for PopupTokens
impl Global for PopupTokens
Source§impl PartialEq for PopupTokens
impl PartialEq for PopupTokens
impl StructuralPartialEq for PopupTokens
Auto Trait Implementations§
impl Freeze for PopupTokens
impl RefUnwindSafe for PopupTokens
impl Send for PopupTokens
impl Sync for PopupTokens
impl Unpin for PopupTokens
impl UnsafeUnpin for PopupTokens
impl UnwindSafe for PopupTokens
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Instruments this type with the provided [
Span], returning an
Instrumented wrapper.§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§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<T> ReadGlobal for Twhere
T: Global,
impl<T> ReadGlobal for Twhere
T: Global,
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().§impl<T> UpdateGlobal for Twhere
T: Global,
impl<T> UpdateGlobal for Twhere
T: Global,
§fn update_global<C, F, R>(cx: &mut C, update: F) -> R
fn update_global<C, F, R>(cx: &mut C, update: F) -> R
Updates the global instance of the implementing type using the provided closure.
§fn set_global<C>(cx: &mut C, global: T)where
C: BorrowAppContext,
fn set_global<C>(cx: &mut C, global: T)where
C: BorrowAppContext,
Set the global instance of the implementing type.
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
Attaches the provided
Subscriber to this type, returning a
[WithDispatch] wrapper.