pub struct TextSelectionSnapshot { /* private fields */ }Expand description
Participant-relative selection endpoints with an optional rendering projection.
Implementations§
Source§impl TextSelectionSnapshot
impl TextSelectionSnapshot
Sourcepub const fn anchor(&self) -> TextSelectionEndpoint
pub const fn anchor(&self) -> TextSelectionEndpoint
Returns the stable anchor endpoint.
Sourcepub const fn cursor(&self) -> TextSelectionEndpoint
pub const fn cursor(&self) -> TextSelectionEndpoint
Returns the moving cursor endpoint.
Sourcepub const fn is_selecting(&self) -> bool
pub const fn is_selecting(&self) -> bool
Returns whether the pointer gesture is still active.
Sourcepub const fn window_points(&self) -> Option<TextSelectionWindowPoints>
pub const fn window_points(&self) -> Option<TextSelectionWindowPoints>
Returns the window-coordinate endpoints for participants that need them.
Sourcepub const fn coverage(&self) -> TextSelectionCoverage
pub const fn coverage(&self) -> TextSelectionCoverage
Returns the portion of the receiving participant covered by this selection.
Trait Implementations§
Source§impl Clone for TextSelectionSnapshot
impl Clone for TextSelectionSnapshot
Source§fn clone(&self) -> TextSelectionSnapshot
fn clone(&self) -> TextSelectionSnapshot
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 TextSelectionSnapshot
Source§impl Debug for TextSelectionSnapshot
impl Debug for TextSelectionSnapshot
Source§impl PartialEq for TextSelectionSnapshot
impl PartialEq for TextSelectionSnapshot
impl StructuralPartialEq for TextSelectionSnapshot
Auto Trait Implementations§
impl Freeze for TextSelectionSnapshot
impl RefUnwindSafe for TextSelectionSnapshot
impl Send for TextSelectionSnapshot
impl Sync for TextSelectionSnapshot
impl Unpin for TextSelectionSnapshot
impl UnsafeUnpin for TextSelectionSnapshot
impl UnwindSafe for TextSelectionSnapshot
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 more