Struct cosmic_text::LayoutCursor
source · pub struct LayoutCursor {
pub line: usize,
pub layout: usize,
pub glyph: usize,
}
Expand description
The position of a cursor within a [Buffer
].
Fields§
§line: usize
Index of [BufferLine
] in [Buffer::lines
]
layout: usize
Index of [LayoutLine
] in [BufferLine::layout
]
glyph: usize
Index of [LayoutGlyph
] in [LayoutLine::glyphs
]
Implementations§
source§impl LayoutCursor
impl LayoutCursor
Trait Implementations§
source§impl Clone for LayoutCursor
impl Clone for LayoutCursor
source§fn clone(&self) -> LayoutCursor
fn clone(&self) -> LayoutCursor
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for LayoutCursor
impl Debug for LayoutCursor
source§impl Ord for LayoutCursor
impl Ord for LayoutCursor
source§fn cmp(&self, other: &LayoutCursor) -> Ordering
fn cmp(&self, other: &LayoutCursor) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for LayoutCursor
impl PartialEq for LayoutCursor
source§impl PartialOrd for LayoutCursor
impl PartialOrd for LayoutCursor
impl Copy for LayoutCursor
impl Eq for LayoutCursor
impl StructuralPartialEq for LayoutCursor
Auto Trait Implementations§
impl Freeze for LayoutCursor
impl RefUnwindSafe for LayoutCursor
impl Send for LayoutCursor
impl Sync for LayoutCursor
impl Unpin for LayoutCursor
impl UnwindSafe for LayoutCursor
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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