MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / with_flags

Method with_flags

atomic-core/src/output/alive/vertex.rs:314–317  ·  view source on GitHub ↗

Create an alive vertex with specific flags. This is useful for creating zombie vertices. # Example ```rust use atomic_core::output::alive::{AliveVertex, VertexFlags}; use atomic_core::types::{NodeId, GraphNode, ChangePosition}; let v = GraphNode::new(NodeId::new(1), ChangePosition::new(0), ChangePosition::new(10)); let zombie = AliveVertex::new(v).with_flags(VertexFlags::ZOMBIE); assert!(zombi

(mut self, flags: VertexFlags)

Source from the content-addressed store, hash-verified

312 /// assert!(zombie.is_zombie());
313 /// ```
314 pub fn with_flags(mut self, flags: VertexFlags) -> Self {
315 self.flags = flags;
316 self
317 }
318
319 /// Get the current flags.
320 #[inline]

Callers 2

Calls

no outgoing calls

Tested by 2