Expand description
Span of text that VFS can operate with.
Variants§
UnicodeScalarValue(SpanData)
Span with offsets based on unicode scalar values.
Utf16CodeUnit(SpanData)
Span with offsets based on UTF-16 code units.
Implementations§
source§impl VfsSpan
impl VfsSpan
pub fn from_usv(span: Span<ZeroIndexed>, len: Option<u64>) -> VfsSpan
pub fn from_utf16(span: Span<ZeroIndexed>, len: Option<u64>) -> VfsSpan
sourcepub fn byte_in_str(&self, s: &str, c: Column<ZeroIndexed>) -> Result<usize, Error>
pub fn byte_in_str(&self, s: &str, c: Column<ZeroIndexed>) -> Result<usize, Error>
Return a UTF-8 byte offset in s
for a given text unit offset.
pub fn span(&self) -> &Span<ZeroIndexed>
pub fn len(&self) -> Option<u64>
Trait Implementations§
source§impl Ord for VfsSpan
impl Ord for VfsSpan
source§impl PartialOrd<VfsSpan> for VfsSpan
impl PartialOrd<VfsSpan> for VfsSpan
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more