pub struct GeometryGraphBuilder { /* private fields */ }Expand description
Append-only builder that makes cycles and dangling references unrepresentable.
Implementations§
Source§impl GeometryGraphBuilder
impl GeometryGraphBuilder
Sourcepub fn push(&mut self, node: GeometryNode) -> Result<NodeId, GraphError>
pub fn push(&mut self, node: GeometryNode) -> Result<NodeId, GraphError>
Insert a node. Every reference must be to an earlier node.
Sourcepub fn push_value<T>(&mut self, value: T) -> Result<NodeId, GraphError>where
T: BuiltInNode,
pub fn push_value<T>(&mut self, value: T) -> Result<NodeId, GraphError>where
T: BuiltInNode,
Insert one canonical representation without spelling its enum variant.
The accepted set is deliberately sealed; adapters must translate custom values into a built-in neutral representation before graph construction.
Sourcepub fn finish(self, roots: Vec<NodeId>) -> Result<GeometryGraph, GraphError>
pub fn finish(self, roots: Vec<NodeId>) -> Result<GeometryGraph, GraphError>
Freeze the graph after validating roots.
Trait Implementations§
Source§impl Debug for GeometryGraphBuilder
impl Debug for GeometryGraphBuilder
Auto Trait Implementations§
impl Freeze for GeometryGraphBuilder
impl RefUnwindSafe for GeometryGraphBuilder
impl Send for GeometryGraphBuilder
impl Sync for GeometryGraphBuilder
impl Unpin for GeometryGraphBuilder
impl UnwindSafe for GeometryGraphBuilder
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