#[non_exhaustive]pub struct AnnotationLine {
pub id: String,
pub line: u32,
pub content: String,
pub author: Option<String>,
pub date: Option<i64>,
}Expand description
One line of file attribution — the honest least common denominator between
git’s blame and jj’s file annotate. See Repo::annotate.
author/date are Some only on git: jj’s typed annotation reports the
change that introduced a line, but not an author or timestamp. This DTO leaves
both fields None on jj rather than fabricating provenance. date, when
present, is git’s author timestamp as Unix seconds.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: StringRevision that last changed the line: git’s full commit object id / jj’s short change id.
line: u32Line number in the annotated file (1-based).
content: StringThe line’s content, without its row-separating newline.
Author name on git; None on jj (see the type docs).
date: Option<i64>Author timestamp as Unix seconds on git; None on jj (see the type docs).
Implementations§
Trait Implementations§
Source§impl Clone for AnnotationLine
impl Clone for AnnotationLine
Source§fn clone(&self) -> AnnotationLine
fn clone(&self) -> AnnotationLine
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 AnnotationLine
impl Debug for AnnotationLine
impl Eq for AnnotationLine
Source§impl PartialEq for AnnotationLine
impl PartialEq for AnnotationLine
Source§impl Serialize for AnnotationLine
impl Serialize for AnnotationLine
impl StructuralPartialEq for AnnotationLine
Auto Trait Implementations§
impl Freeze for AnnotationLine
impl RefUnwindSafe for AnnotationLine
impl Send for AnnotationLine
impl Sync for AnnotationLine
impl Unpin for AnnotationLine
impl UnsafeUnpin for AnnotationLine
impl UnwindSafe for AnnotationLine
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