pub struct Sentence {
pub sentence: String,
pub buffer_byte_start: usize,
pub buffer_byte_end: usize,
}Expand description
A sentence in the buffer, located by Buffer::sentence_containing.
Carries enough information for a caller holding an in-buffer byte
offset (e.g. a NearbyWord’s byte_start/byte_end) to map it
into sentence-relative bytes via subtraction.
Fields§
§sentence: StringThe sentence’s text, with surrounding whitespace trimmed.
buffer_byte_start: usizeByte offset of sentence’s first byte within the buffer’s text.
buffer_byte_end: usizeByte offset one past sentence’s last byte within the buffer’s
text. Half-open range: [buffer_byte_start, buffer_byte_end).
Trait Implementations§
impl Eq for Sentence
impl StructuralPartialEq for Sentence
Auto Trait Implementations§
impl Freeze for Sentence
impl RefUnwindSafe for Sentence
impl Send for Sentence
impl Sync for Sentence
impl Unpin for Sentence
impl UnsafeUnpin for Sentence
impl UnwindSafe for Sentence
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.