#[non_exhaustive]pub struct TextSegment {
pub start_index: i64,
pub end_index: i64,
/* private fields */
}Expand description
A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.start_index: i64TextSegment start UTF-8 char index in the Document.text.
end_index: i64TextSegment half open end UTF-8 char index in the Document.text.
Implementations§
Source§impl TextSegment
impl TextSegment
Sourcepub fn set_start_index<T: Into<i64>>(self, v: T) -> Self
pub fn set_start_index<T: Into<i64>>(self, v: T) -> Self
Trait Implementations§
Source§impl Clone for TextSegment
impl Clone for TextSegment
Source§fn clone(&self) -> TextSegment
fn clone(&self) -> TextSegment
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TextSegment
impl Debug for TextSegment
Source§impl Default for TextSegment
impl Default for TextSegment
Source§fn default() -> TextSegment
fn default() -> TextSegment
Returns the “default value” for a type. Read more
Source§impl Message for TextSegment
impl Message for TextSegment
Source§impl PartialEq for TextSegment
impl PartialEq for TextSegment
impl StructuralPartialEq for TextSegment
Auto Trait Implementations§
impl Freeze for TextSegment
impl RefUnwindSafe for TextSegment
impl Send for TextSegment
impl Sync for TextSegment
impl Unpin for TextSegment
impl UnsafeUnpin for TextSegment
impl UnwindSafe for TextSegment
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more