pub struct SourceLocation {
pub revision: GitRevision,
pub path: PathBuf,
pub lines: Option<(usize, usize)>,
}Expand description
A revisioned source location (0014 wave 4): permalinks, jumps into history, and blame’s parent-hop all speak this — no more “permalink from a historical view links HEAD’s file”.
Fields§
§revision: GitRevision§path: PathBufRepo-relative path.
lines: Option<(usize, usize)>1-based line range, when the location is a selection.
Implementations§
Source§impl SourceLocation
impl SourceLocation
Sourcepub fn revision_slug(&self) -> String
pub fn revision_slug(&self) -> String
The URL slug: a pinned commit sha or the branch’s name.
Trait Implementations§
Source§impl Clone for SourceLocation
impl Clone for SourceLocation
Source§fn clone(&self) -> SourceLocation
fn clone(&self) -> SourceLocation
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 SourceLocation
impl Debug for SourceLocation
impl Eq for SourceLocation
Source§impl PartialEq for SourceLocation
impl PartialEq for SourceLocation
impl StructuralPartialEq for SourceLocation
Auto Trait Implementations§
impl Freeze for SourceLocation
impl RefUnwindSafe for SourceLocation
impl Send for SourceLocation
impl Sync for SourceLocation
impl Unpin for SourceLocation
impl UnsafeUnpin for SourceLocation
impl UnwindSafe for SourceLocation
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