SentenceSegment
struct · ferroui-base · v0.5.0
struct SentenceSegment<'a>
Represents a segment between two Unicode sentence boundaries (UAX #29).
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.
offset
const fn offset(self: &Self) -> usize
Gets the segment start offset in UTF-16 code units within the source span.
text
const fn text(self: &Self) -> &'a [u16]
Gets the text content of this segment as a slice of the source span.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafePropertyValueAnyValueClassDefaultsBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedErasedDestructorIntoEitherCloneCopyDebugDefaultStructuralPartialEqPartialEqEq
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.