pub struct Scope { /* private fields */ }Expand description
Line ranges per file. Paths are relative to the workspace root, with / separators.
Implementations§
Source§impl Scope
impl Scope
Sourcepub fn parse_lines(specs: &[String]) -> Result<Scope>
pub fn parse_lines(specs: &[String]) -> Result<Scope>
Parses FILE, FILE:LINE or FILE:FROM-TO (1-based, inclusive).
Sourcepub fn from_diff(diff: &str) -> Scope
pub fn from_diff(diff: &str) -> Scope
Reads the output of git diff -U0: the lines each hunk adds or changes. A hunk that
only deletes marks the lines on either side of the deletion, because the code that
is left there now behaves differently.
pub fn add(&mut self, file: &str, range: (usize, usize))
pub fn add_whole_file(&mut self, file: &str)
pub fn merge(&mut self, other: Scope)
pub fn is_empty(&self) -> bool
pub fn files(&self) -> impl Iterator<Item = &str>
Trait Implementations§
impl Eq for Scope
impl StructuralPartialEq for Scope
Auto Trait Implementations§
impl Forget for Scope
impl Freeze for Scope
impl Move for Scope
impl RefUnwindSafe for Scope
impl Send for Scope
impl Sync for Scope
impl Unpin for Scope
impl UnsafeUnpin for Scopewhere
*const LeafNode<String, Vec<(usize, usize)>> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, Vec<(usize, usize)>)>>: UnsafeUnpin,
impl UnwindSafe for Scope
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.