pub struct GraphRowShaper<N> { /* private fields */ }Expand description
Stateful renderer for the first pipeline stage.
It consumes a stream of (node, parents) entries and produces one
GraphRowShape per node. The output is purely structural: it describes
column placement and abstract edge shapes, without choosing glyph characters
or attaching message text.
Implementations§
Source§impl<N> GraphRowShaper<N>
impl<N> GraphRowShaper<N>
Sourcepub fn new() -> GraphRowShaper<N>
pub fn new() -> GraphRowShaper<N>
Create a renderer with default graph-shape options.
Sourcepub fn with_options(options: OutputRendererOptions) -> GraphRowShaper<N>
pub fn with_options(options: OutputRendererOptions) -> GraphRowShaper<N>
Create a renderer with explicit graph-shape options.
Sourcepub fn options(&self) -> &OutputRendererOptions
pub fn options(&self) -> &OutputRendererOptions
Return the graph-shape options used by this renderer.
Sourcepub fn options_mut(&mut self) -> &mut OutputRendererOptions
pub fn options_mut(&mut self) -> &mut OutputRendererOptions
Return mutable graph-shape options used by this renderer.
Sourcepub fn width(&self, node: Option<&N>, parents: Option<&Vec<Ancestor<N>>>) -> u64
pub fn width(&self, node: Option<&N>, parents: Option<&Vec<Ancestor<N>>>) -> u64
Return the number of graph columns needed after optionally considering the next node and its parents.
Sourcepub fn width_with_options(
&self,
node: Option<&N>,
parents: Option<&Vec<Ancestor<N>>>,
options: OutputRendererOptions,
) -> u64
pub fn width_with_options( &self, node: Option<&N>, parents: Option<&Vec<Ancestor<N>>>, options: OutputRendererOptions, ) -> u64
Return the number of graph columns needed with explicit graph-shape options.
Sourcepub fn next_row_shape(
&mut self,
node: N,
parents: Vec<Ancestor<N>>,
) -> GraphRowShape<N>
pub fn next_row_shape( &mut self, node: N, parents: Vec<Ancestor<N>>, ) -> GraphRowShape<N>
Render the next node into an abstract graph row shape.
Trait Implementations§
Auto Trait Implementations§
impl<N> Freeze for GraphRowShaper<N>
impl<N> RefUnwindSafe for GraphRowShaper<N>where
Vec<Column<N>>: RefUnwindSafe,
impl<N> Send for GraphRowShaper<N>
impl<N> Sync for GraphRowShaper<N>
impl<N> Unpin for GraphRowShaper<N>
impl<N> UnsafeUnpin for GraphRowShaper<N>where
Vec<Column<N>>: UnsafeUnpin,
impl<N> UnwindSafe for GraphRowShaper<N>where
Vec<Column<N>>: UnwindSafe,
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