pub struct GraphLayout { /* private fields */ }Expand description
Incremental graph layout state.
Implementations§
Source§impl GraphLayout
impl GraphLayout
Sourcepub fn new(charset: GraphCharset) -> Self
pub fn new(charset: GraphCharset) -> Self
New layout using charset.
Sourcepub fn new_without_topology_recording(charset: GraphCharset) -> Self
pub fn new_without_topology_recording(charset: GraphCharset) -> Self
Like Self::new, but skips per-row GraphRowTopology bookkeeping (used by log --graph production rendering; tests keep topology via Self::new).
Sourcepub fn topologies(&self) -> &[GraphRowTopology]
pub fn topologies(&self) -> &[GraphRowTopology]
Topologies recorded for each commit line (for unit tests).
Sourcepub fn width(&self) -> usize
pub fn width(&self) -> usize
Current graph width in columns (excluding trailing space after the last lane).
Sourcepub fn render(
&mut self,
commits: &[GraphCommitInput],
) -> Vec<Vec<GraphRenderedLine>>
pub fn render( &mut self, commits: &[GraphCommitInput], ) -> Vec<Vec<GraphRenderedLine>>
Consume commits in display order (newest first) and return graph lines grouped per commit.
Sourcepub fn render_commit(
&mut self,
commit: &GraphCommitInput,
) -> Vec<GraphRenderedLine>
pub fn render_commit( &mut self, commit: &GraphCommitInput, ) -> Vec<GraphRenderedLine>
Render the next commit while preserving lane state across calls (full log --graph walk).
Trait Implementations§
Source§impl Clone for GraphLayout
impl Clone for GraphLayout
Source§impl Debug for GraphLayout
impl Debug for GraphLayout
Auto Trait Implementations§
impl Forget for GraphLayout
impl Freeze for GraphLayout
impl RefUnwindSafe for GraphLayout
impl Send for GraphLayout
impl Sync for GraphLayout
impl Unpin for GraphLayout
impl UnsafeUnpin for GraphLayout
impl UnwindSafe for GraphLayout
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