pub struct SentenceAtCaret {
pub sentence: String,
pub trailing: String,
pub chars_before_caret: usize,
pub chars_after_caret: usize,
}Expand description
The sentence containing (or immediately to the left of) the caret,
with metadata for the emit-side replace. Returned by
Buffer::sentence_at_caret.
Fields§
§sentence: StringThe full sentence — both halves around the caret if the caret sits inside the sentence.
trailing: StringWhitespace between the right edge of the sentence and the caret when the caret is in trailing whitespace.
chars_before_caret: usizeHow many characters of sentence sit BEFORE the caret.
chars_after_caret: usizeHow many characters of sentence sit AFTER the caret.
Trait Implementations§
Source§impl Clone for SentenceAtCaret
impl Clone for SentenceAtCaret
Source§fn clone(&self) -> SentenceAtCaret
fn clone(&self) -> SentenceAtCaret
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SentenceAtCaret
impl Debug for SentenceAtCaret
Source§impl PartialEq for SentenceAtCaret
impl PartialEq for SentenceAtCaret
Source§fn eq(&self, other: &SentenceAtCaret) -> bool
fn eq(&self, other: &SentenceAtCaret) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for SentenceAtCaret
impl StructuralPartialEq for SentenceAtCaret
Auto Trait Implementations§
impl Freeze for SentenceAtCaret
impl RefUnwindSafe for SentenceAtCaret
impl Send for SentenceAtCaret
impl Sync for SentenceAtCaret
impl Unpin for SentenceAtCaret
impl UnsafeUnpin for SentenceAtCaret
impl UnwindSafe for SentenceAtCaret
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.