[][src]Enum rls_vfs::VfsSpan

pub enum VfsSpan {
    UnicodeScalarValue(SpanData),
    Utf16CodeUnit(SpanData),
}

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]

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 Eq for VfsSpan[src]

impl PartialOrd<VfsSpan> for VfsSpan[src]

impl PartialEq<VfsSpan> for VfsSpan[src]

impl Ord for VfsSpan[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 Debug for VfsSpan[src]

impl Hash for VfsSpan[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

Auto Trait Implementations

impl Send for VfsSpan

impl Sync for VfsSpan

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.