pub struct ProofTreeExporter {
pub config: ExportConfig,
}Expand description
Exports verified proof trees to multiple formats.
Fields§
§config: ExportConfigExport configuration.
Implementations§
Source§impl ProofTreeExporter
impl ProofTreeExporter
Sourcepub fn new(config: ExportConfig) -> Self
pub fn new(config: ExportConfig) -> Self
Create a new exporter with the given configuration.
Sourcepub fn export(&self, nodes: &[ExportNode]) -> String
pub fn export(&self, nodes: &[ExportNode]) -> String
Export nodes to the string format described by self.config.
Returns "(empty)" when nodes is empty.
Sourcepub fn to_dot(&self, nodes: &[ExportNode]) -> String
pub fn to_dot(&self, nodes: &[ExportNode]) -> String
Render nodes as Graphviz DOT.
Sourcepub fn to_json(&self, nodes: &[ExportNode]) -> String
pub fn to_json(&self, nodes: &[ExportNode]) -> String
Render nodes as a compact JSON array.
Sourcepub fn to_indented_text(&self, nodes: &[ExportNode]) -> String
pub fn to_indented_text(&self, nodes: &[ExportNode]) -> String
Render nodes as an indented ASCII tree (DFS from root).
Sourcepub fn to_edge_list(&self, nodes: &[ExportNode]) -> String
pub fn to_edge_list(&self, nodes: &[ExportNode]) -> String
Render nodes as a flat edge list (parent_id -> child_id).
Sourcepub fn node_count(&self, nodes: &[ExportNode]) -> usize
pub fn node_count(&self, nodes: &[ExportNode]) -> usize
Number of nodes that pass the max_depth filter.
Sourcepub fn edge_count(&self, nodes: &[ExportNode]) -> usize
pub fn edge_count(&self, nodes: &[ExportNode]) -> usize
Total number of child edges among nodes that pass the max_depth filter.
Auto Trait Implementations§
impl Freeze for ProofTreeExporter
impl RefUnwindSafe for ProofTreeExporter
impl Send for ProofTreeExporter
impl Sync for ProofTreeExporter
impl Unpin for ProofTreeExporter
impl UnsafeUnpin for ProofTreeExporter
impl UnwindSafe for ProofTreeExporter
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more