FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    SentenceSegment

    struct · ferroui-base · v0.5.0

    struct SentenceSegment<'a>
    

    Represents a segment between two Unicode sentence boundaries (UAX #29).

    View source

    Members

    new

    const fn new(offset: usize, text: &'a [u16]) -> Self
    

    Initializes a new instance of the SentenceSegment struct.

    • offset - The segment offset in UTF-16 code units within the source span.
    • text - The slice of the source span that makes up this segment.

    Source

    offset

    const fn offset(self: &Self) -> usize
    

    Gets the segment start offset in UTF-16 code units within the source span.

    Source

    text

    const fn text(self: &Self) -> &'a [u16]
    

    Gets the text content of this segment as a slice of the source span.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • PropertyValue
    • AnyValue
    • ClassDefaults
    • Borrow<T>
    • BorrowMut<T>
    • CloneToUninit
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ToOwned
    • ErasedDestructor
    • IntoEither
    • Clone
    • Copy
    • Debug
    • Default
    • StructuralPartialEq
    • PartialEq
    • Eq

    Availability

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