[−][src]Enum rls_vfs::VfsSpan
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.
Methods
impl VfsSpan
[src]
pub fn from_usv(span: Span<ZeroIndexed>, len: Option<u64>) -> VfsSpan
[src]
pub fn from_utf16(span: Span<ZeroIndexed>, len: Option<u64>) -> VfsSpan
[src]
pub fn byte_in_str(
&self,
s: &str,
c: Column<ZeroIndexed>
) -> Result<usize, Error>
[src]
&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>
[src]
pub fn len(&self) -> Option<u64>
[src]
Trait Implementations
impl PartialEq<VfsSpan> for VfsSpan
[src]
impl Ord for VfsSpan
[src]
fn cmp(&self, other: &VfsSpan) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
fn clamp(self, min: Self, max: Self) -> Self
[src]
🔬 This is a nightly-only experimental API. (
clamp
)Restrict a value to a certain interval. Read more
impl Eq for VfsSpan
[src]
impl PartialOrd<VfsSpan> for VfsSpan
[src]
fn partial_cmp(&self, other: &VfsSpan) -> Option<Ordering>
[src]
fn lt(&self, other: &VfsSpan) -> bool
[src]
fn le(&self, other: &VfsSpan) -> bool
[src]
fn gt(&self, other: &VfsSpan) -> bool
[src]
fn ge(&self, other: &VfsSpan) -> bool
[src]
impl Debug for VfsSpan
[src]
impl Hash for VfsSpan
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,