pub struct InlineTokenHoverEvent { /* private fields */ }Expand description
Hover snapshot for one atomic inline token. Hover never selects or edits; it reports pointer presence so the application can show a tooltip or run custom logic.
Implementations§
Source§impl InlineTokenHoverEvent
impl InlineTokenHoverEvent
pub fn token(&self) -> &InlineToken
pub fn range(&self) -> Range<usize> ⓘ
pub fn bounds(&self) -> Bounds<Pixels>
Sourcepub fn is_hovered(&self) -> bool
pub fn is_hovered(&self) -> bool
Whether the pointer entered (true) or left (false) the token.
Sourcepub fn range_utf16(&self) -> (usize, usize)
pub fn range_utf16(&self) -> (usize, usize)
The token range in UTF-16 code units, captured when the event was built. Exits delivered after the text changed report these entry coordinates, since the byte range can no longer be converted against the current text.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for InlineTokenHoverEvent
impl RefUnwindSafe for InlineTokenHoverEvent
impl Send for InlineTokenHoverEvent
impl Sync for InlineTokenHoverEvent
impl Unpin for InlineTokenHoverEvent
impl UnsafeUnpin for InlineTokenHoverEvent
impl UnwindSafe for InlineTokenHoverEvent
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,
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