diff options
Diffstat (limited to 'chain/src/item/mod.rs')
-rw-r--r-- | chain/src/item/mod.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/chain/src/item/mod.rs b/chain/src/item/mod.rs index d2c3127..ed41c61 100644 --- a/chain/src/item/mod.rs +++ b/chain/src/item/mod.rs @@ -89,10 +89,13 @@ impl PaVi { /// An internal type that indicates the status of a node as either a /// packed, cloned, or plain node. #[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Default)] -enum ForestLabelType { +pub enum ForestLabelType { + /// A packed node Packed, + /// A plain node #[default] Plain, + /// A cloned node Cloned(usize), } @@ -144,7 +147,8 @@ impl std::fmt::Display for ForestLabelError { impl std::error::Error for ForestLabelError {} impl<T: GraphLabel> ForestLabel<T> { - fn new(label: T, status: ForestLabelType) -> Self { + /// Construct a new label with the inner `label` and `status`. + pub fn new(label: T, status: ForestLabelType) -> Self { Self { label, status } } |