pub struct LogEntry { /* private fields */ }Expand description
A semantic log item that the TUI can navigate without knowing how jj produced it.
Implementations§
Source§impl LogEntry
impl LogEntry
Sourcepub fn new(
change_id: impl Into<String>,
commit_id: impl Into<String>,
description: impl Into<String>,
) -> Self
pub fn new( change_id: impl Into<String>, commit_id: impl Into<String>, description: impl Into<String>, ) -> Self
Creates a log entry from jj change metadata.
New entries default to rendered line 0; callers that build a LogSnapshot should set
the aligned rendered line with Self::with_rendered_line while constructing entries.
Sourcepub fn with_details(self, details: impl Into<String>) -> Self
pub fn with_details(self, details: impl Into<String>) -> Self
Sets the template-derived detail text for inline expansion.
Sourcepub const fn with_rendered_line(self, rendered_line: usize) -> Self
pub const fn with_rendered_line(self, rendered_line: usize) -> Self
Sets the rendered line for this entry.
Sourcepub fn commit_id(&self) -> &str
pub fn commit_id(&self) -> &str
Returns the commit identifier for follow-up inspection commands.
Sourcepub fn description(&self) -> &str
pub fn description(&self) -> &str
Returns the full commit description.
Sourcepub const fn rendered_line(&self) -> usize
pub const fn rendered_line(&self) -> usize
Returns the zero-based line in the rendered jj output for this entry.
Trait Implementations§
impl Eq for LogEntry
impl StructuralPartialEq for LogEntry
Auto Trait Implementations§
impl Forget for LogEntry
impl Freeze for LogEntry
impl RefUnwindSafe for LogEntry
impl Send for LogEntry
impl Sync for LogEntry
impl Unpin for LogEntry
impl UnsafeUnpin for LogEntry
impl UnwindSafe for LogEntry
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