TextRange
yosoi::locators::TextRange
pub struct TextRange
Half-open Unicode-scalar range in decoded text, possibly empty.
Source: crates/yosoi/src/internal/documents/outcome_coordinates.rs:87
SDK re-export: Source: crates/yosoi/src/locators.rs:10
Methods
Section titled “Methods”pub const fn end(self) -> u64
Returns the exclusive Unicode-scalar ending offset in decoded text.
Source: crates/yosoi/src/internal/documents/outcome_coordinates.rs:111
pub const fn start(self) -> u64
Returns the inclusive Unicode-scalar starting offset in decoded text.
Source: crates/yosoi/src/internal/documents/outcome_coordinates.rs:107
try_new
Section titled “try_new”pub const fn try_new(start: u64, end: u64) -> Result<Self, yosoi::locators::CoordinateError>
Creates [start, end) Unicode-scalar offsets, allowing an empty range.
Returns [CoordinateError::ReversedRange] when end < start. Offsets
count Unicode scalars rather than UTF-8 bytes or grapheme clusters;
construction does not verify the range against any text.
Source: crates/yosoi/src/internal/documents/outcome_coordinates.rs:98
Trait implementations
Section titled “Trait implementations”Clone
fn clone(&self) -> yosoi::locators::TextRange
Source: crates/yosoi/src/internal/documents/outcome_coordinates.rs:85
Debug
fn fmt(&self, f: &mut $crate::fmt::Formatter<'_>) -> $crate::fmt::Result
Source: crates/yosoi/src/internal/documents/outcome_coordinates.rs:85
Deserialize
deserialize
Section titled “deserialize”fn deserialize<D>(deserializer: D) -> Result<Self, <D as >::Error> where D: Deserializer<'de>
Source: crates/yosoi/src/internal/documents/outcome_coordinates.rs:148
Hash
fn hash<__H: $crate::hash::Hasher>(&self, state: &mut __H)
Source: crates/yosoi/src/internal/documents/outcome_coordinates.rs:85
PartialEq
fn eq(&self, other: &yosoi::locators::TextRange) -> bool
Source: crates/yosoi/src/internal/documents/outcome_coordinates.rs:85
Serialize
serialize
Section titled “serialize”fn serialize<__S>(&self, __serializer: __S) -> _serde::__private229::Result<<__S as >::Ok, <__S as >::Error> where __S: _serde::Serializer
Source: crates/yosoi/src/internal/documents/outcome_coordinates.rs:85