oxidd_manager_pointer/node/mod.rs
1pub mod fixed_arity;
2
3/// Base traits to be satisfied by inner nodes for oxidd-manager. This does not
4/// include the [`InnerNode`][oxidd_core::InnerNode] trait.
5///
6/// # Safety
7///
8/// The reference counter must be initialized to 2.
9pub unsafe trait NodeBase: arcslab::AtomicRefCounted + Eq + std::hash::Hash {
10 /// Whether this node type contains additional data that needs to be dropped
11 /// to avoid memory leaks.
12 ///
13 /// If the node only consists of [`Edge`][crate::manager::Edge]s and types
14 /// that implement [`Copy`], an implementation may return `false`. This may
15 /// speed up dropping a diagram a lot.
16 #[inline(always)]
17 fn needs_drop() -> bool {
18 true
19 }
20}