pub struct TextSplice {
pub label: String,
pub file: PathBuf,
pub range: Range<usize>,
pub old: String,
pub new: String,
pub caret_before: Range<usize>,
pub caret_after: Range<usize>,
}Fields§
§label: String§file: PathBuf§range: Range<usize>§old: String§new: String§caret_before: Range<usize>§caret_after: Range<usize>Implementations§
Source§impl TextSplice
impl TextSplice
pub fn new( file: impl Into<PathBuf>, range: Range<usize>, old: impl Into<String>, new: impl Into<String>, ) -> TextSplice
pub fn between( file: impl Into<PathBuf>, before: &str, after: &str, ) -> Option<TextSplice>
pub fn labelled(self, label: impl Into<String>) -> TextSplice
pub fn with_carets( self, before: Range<usize>, after: Range<usize>, ) -> TextSplice
pub fn file(&self) -> &Path
pub fn end(&self) -> usize
Trait Implementations§
Source§impl Clone for TextSplice
impl Clone for TextSplice
Source§fn clone(&self) -> TextSplice
fn clone(&self) -> TextSplice
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 TextSplice
impl Debug for TextSplice
Source§impl Edit for TextSplice
impl Edit for TextSplice
Source§impl PartialEq for TextSplice
impl PartialEq for TextSplice
Source§fn eq(&self, other: &TextSplice) -> bool
fn eq(&self, other: &TextSplice) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for TextSplice
impl StructuralPartialEq for TextSplice
Auto Trait Implementations§
impl Freeze for TextSplice
impl RefUnwindSafe for TextSplice
impl Send for TextSplice
impl Sync for TextSplice
impl Unpin for TextSplice
impl UnsafeUnpin for TextSplice
impl UnwindSafe for TextSplice
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.