FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    LineIndex

    struct · ferroui-designer-language · v0.5.0

    struct LineIndex
    

    UTF-16 LSP positions over UTF-8 authored bytes, retaining LF/CRLF/CR exactly.

    View source

    Members

    new

    fn new(source: &str) -> Self
    

    Source

    source

    fn source(self: &Self) -> &str
    

    Source

    line_count

    fn line_count(self: &Self) -> usize
    

    Source

    offset

    fn offset(self: &Self, position: Position) -> Result<usize>
    

    Source

    position

    fn position(self: &Self, offset: usize) -> Result<Position>
    

    Source

    span

    fn span(self: &Self, range: Range) -> Result<SourceSpan>
    

    Source

    range

    fn range(self: &Self, span: SourceSpan) -> Result<Range>
    

    Source

    apply

    fn apply(self: &mut Self, change: &TextChange) -> Result<()>
    

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • Borrow<T>
    • BorrowMut<T>
    • CloneToUninit
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ToOwned
    • Clone
    • Debug

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.