#[repr(C)]pub struct DocumentSelectionSpan {
pub node: DomNodeId,
pub start_byte: u32,
pub end_byte: u32,
}Expand description
A selected byte span [start_byte, end_byte) of node’s text content,
in the coordinates of DocumentPosition. Always LOGICAL and
NORMALIZED: start_byte <= end_byte regardless of drag direction or
script direction (an RTL selection is still a forward byte span). A
cross-block selection yields one span per affected node, in document
order.
Fields§
§node: DomNodeId§start_byte: u32§end_byte: u32Trait Implementations§
Source§impl Clone for DocumentSelectionSpan
impl Clone for DocumentSelectionSpan
Source§fn clone(&self) -> DocumentSelectionSpan
fn clone(&self) -> DocumentSelectionSpan
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 DocumentSelectionSpan
Source§impl Debug for DocumentSelectionSpan
impl Debug for DocumentSelectionSpan
impl Eq for DocumentSelectionSpan
Source§impl FromIterator<DocumentSelectionSpan> for DocumentSelectionSpanVec
impl FromIterator<DocumentSelectionSpan> for DocumentSelectionSpanVec
Source§fn from_iter<T>(iter: T) -> Selfwhere
T: IntoIterator<Item = DocumentSelectionSpan>,
fn from_iter<T>(iter: T) -> Selfwhere
T: IntoIterator<Item = DocumentSelectionSpan>,
Creates a value from an iterator. Read more
Source§impl Hash for DocumentSelectionSpan
impl Hash for DocumentSelectionSpan
Source§impl Ord for DocumentSelectionSpan
impl Ord for DocumentSelectionSpan
Source§fn cmp(&self, other: &DocumentSelectionSpan) -> Ordering
fn cmp(&self, other: &DocumentSelectionSpan) -> 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 DocumentSelectionSpan
impl PartialEq for DocumentSelectionSpan
Source§impl PartialOrd for DocumentSelectionSpan
impl PartialOrd for DocumentSelectionSpan
impl StructuralPartialEq for DocumentSelectionSpan
Auto Trait Implementations§
impl Freeze for DocumentSelectionSpan
impl RefUnwindSafe for DocumentSelectionSpan
impl Send for DocumentSelectionSpan
impl Sync for DocumentSelectionSpan
impl Unpin for DocumentSelectionSpan
impl UnsafeUnpin for DocumentSelectionSpan
impl UnwindSafe for DocumentSelectionSpan
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