Struct ra_ap_text_edit::TextEdit
source · [−]pub struct TextEdit { /* private fields */ }Implementations
sourceimpl TextEdit
impl TextEdit
pub fn builder() -> TextEditBuilder
pub fn insert(offset: TextSize, text: String) -> TextEdit
pub fn delete(range: TextRange) -> TextEdit
pub fn replace(range: TextRange, replace_with: String) -> TextEdit
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn iter(&self) -> Iter<'_, Indel>
pub fn apply(&self, text: &mut String)
pub fn union(&mut self, other: TextEdit) -> Result<(), TextEdit>
pub fn apply_to_offset(&self, offset: TextSize) -> Option<TextSize>
Trait Implementations
sourceimpl IntoIterator for TextEdit
impl IntoIterator for TextEdit
Auto Trait Implementations
impl RefUnwindSafe for TextEdit
impl Send for TextEdit
impl Sync for TextEdit
impl Unpin for TextEdit
impl UnwindSafe for TextEdit
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more