#[repr(C)]pub struct DocumentPosition {
pub node: DomNodeId,
pub text_byte: u32,
}Expand description
A position in a node’s TEXT CONTENT, app-facing: text_byte indexes the
flattened text of node — the exact string
CallbackInfo::get_node_text_content(node) returns (overlay-first, so it
sees uncommitted typing). The engine resolves cluster ids and affinity
BEFORE handing this out: the byte always lies on a grapheme-cluster
boundary of that string (a ZWJ emoji family or a decomposed é is never
split), and is in LOGICAL order — bidi visual reordering does not affect
it.
Fields§
§node: DomNodeId§text_byte: u32Trait Implementations§
Source§impl Clone for DocumentPosition
impl Clone for DocumentPosition
Source§fn clone(&self) -> DocumentPosition
fn clone(&self) -> DocumentPosition
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 DocumentPosition
Source§impl Debug for DocumentPosition
impl Debug for DocumentPosition
impl Eq for DocumentPosition
Source§impl Hash for DocumentPosition
impl Hash for DocumentPosition
Source§impl Ord for DocumentPosition
impl Ord for DocumentPosition
Source§fn cmp(&self, other: &DocumentPosition) -> Ordering
fn cmp(&self, other: &DocumentPosition) -> Ordering
1.21.0 (const: unstable) · 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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for DocumentPosition
impl PartialEq for DocumentPosition
Source§impl PartialOrd for DocumentPosition
impl PartialOrd for DocumentPosition
impl StructuralPartialEq for DocumentPosition
Auto Trait Implementations§
impl Freeze for DocumentPosition
impl RefUnwindSafe for DocumentPosition
impl Send for DocumentPosition
impl Sync for DocumentPosition
impl Unpin for DocumentPosition
impl UnsafeUnpin for DocumentPosition
impl UnwindSafe for DocumentPosition
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