pub struct DotPrinter<O: Write> {
output: O,
next_id: usize,
settings: DotPrinterSettings,
}
Expand description
A visitor of the radix trie that will print the tree in “dot” notation.
See ‘DOT Language | Graphviz’ for information about syntax and example of the language.
Fields§
§output: O
§next_id: usize
§settings: DotPrinterSettings
Implementations§
Source§impl<O: Write> DotPrinter<O>
impl<O: Write> DotPrinter<O>
Sourcepub fn print<K, V, const PREFIX_LEN: usize, A: Allocator>(
output: O,
tree: &TreeMap<K, V, PREFIX_LEN, A>,
settings: DotPrinterSettings,
) -> Option<Result<()>>
pub fn print<K, V, const PREFIX_LEN: usize, A: Allocator>( output: O, tree: &TreeMap<K, V, PREFIX_LEN, A>, settings: DotPrinterSettings, ) -> Option<Result<()>>
Write the dot-format of the given tree to the given output.
Sourcepub(crate) unsafe fn print_tree<K, V, const PREFIX_LEN: usize>(
output: O,
tree: &OpaqueNodePtr<K, V, PREFIX_LEN>,
settings: DotPrinterSettings,
) -> Result<()>
pub(crate) unsafe fn print_tree<K, V, const PREFIX_LEN: usize>( output: O, tree: &OpaqueNodePtr<K, V, PREFIX_LEN>, settings: DotPrinterSettings, ) -> Result<()>
Write the dot-format of the given tree to the given output.
§Safety
- For the duration of this function, the given node and all its children nodes must not get mutated.
fn output_prelude(&mut self) -> Result<()>
fn output_epilogue(&mut self) -> Result<()>
fn get_id(&mut self) -> usize
fn write_inner_node<K, T, N, const PREFIX_LEN: usize>( &mut self, inner_node: &N, ) -> Result<usize>
Trait Implementations§
Source§impl<K, T, O, const PREFIX_LEN: usize> Visitor<K, T, PREFIX_LEN> for DotPrinter<O>
impl<K, T, O, const PREFIX_LEN: usize> Visitor<K, T, PREFIX_LEN> for DotPrinter<O>
Source§fn default_output(&self) -> Self::Output
fn default_output(&self) -> Self::Output
Produce the default value of the
Self::Output
type.Source§fn combine_output(&self, _: Self::Output, _: Self::Output) -> Self::Output
fn combine_output(&self, _: Self::Output, _: Self::Output) -> Self::Output
Combine two instances of the
Self::Output
type for this Visitor
.Source§fn visit_node4(&mut self, t: &InnerNode4<K, T, PREFIX_LEN>) -> Self::Output
fn visit_node4(&mut self, t: &InnerNode4<K, T, PREFIX_LEN>) -> Self::Output
Visit a
InnerNode4
.Source§fn visit_node16(&mut self, t: &InnerNode16<K, T, PREFIX_LEN>) -> Self::Output
fn visit_node16(&mut self, t: &InnerNode16<K, T, PREFIX_LEN>) -> Self::Output
Visit a
InnerNode16
.Source§fn visit_node48(&mut self, t: &InnerNode48<K, T, PREFIX_LEN>) -> Self::Output
fn visit_node48(&mut self, t: &InnerNode48<K, T, PREFIX_LEN>) -> Self::Output
Visit a
InnerNode48
.Source§fn visit_node256(&mut self, t: &InnerNode256<K, T, PREFIX_LEN>) -> Self::Output
fn visit_node256(&mut self, t: &InnerNode256<K, T, PREFIX_LEN>) -> Self::Output
Visit a
InnerNode256
.Auto Trait Implementations§
impl<O> Freeze for DotPrinter<O>where
O: Freeze,
impl<O> RefUnwindSafe for DotPrinter<O>where
O: RefUnwindSafe,
impl<O> Send for DotPrinter<O>where
O: Send,
impl<O> Sync for DotPrinter<O>where
O: Sync,
impl<O> Unpin for DotPrinter<O>where
O: Unpin,
impl<O> UnwindSafe for DotPrinter<O>where
O: 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