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 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.
Trait Implementations§
Source§impl Clone for GraphLayout
impl Clone for GraphLayout
Source§impl Debug for GraphLayout
impl Debug for GraphLayout
Auto Trait Implementations§
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