pub struct CheckpointNamespace {
pub segments: Vec<NamespaceSegment>,
}Expand description
Namespace for checkpoint isolation in subgraph execution
Provides hierarchical namespace isolation to prevent checkpoint collisions when executing nested subgraphs.
The wire format uses a leading | per segment with node_name:invocation_id
pairs, e.g. "|review:uuid1|detail:uuid2". The root namespace is "".
§Examples
ⓘ
use juncture_core::checkpoint::CheckpointNamespace;
let root_ns = CheckpointNamespace::root();
let child_ns = root_ns.child("review", "550e8400-e29b-41d4-a716-446655440000");
let grandchild_ns = child_ns.child("detail", "6ba7b810-9dad-11d1-80b4-00c04fd430c8");
assert_eq!(root_ns.as_str(), "");
assert_eq!(child_ns.as_str(), "|review:550e8400-e29b-41d4-a716-446655440000");
assert_eq!(grandchild_ns.as_str(), "|review:550e8400-e29b-41d4-a716-446655440000|detail:6ba7b810-9dad-11d1-80b4-00c04fd430c8");Fields§
§segments: Vec<NamespaceSegment>Namespace segments forming a hierarchical path
Implementations§
Source§impl CheckpointNamespace
impl CheckpointNamespace
Sourcepub const fn new(segments: Vec<NamespaceSegment>) -> Self
pub const fn new(segments: Vec<NamespaceSegment>) -> Self
Create a namespace from segments
Sourcepub fn child(&self, node_name: &str, invocation_id: &str) -> Self
pub fn child(&self, node_name: &str, invocation_id: &str) -> Self
Create a child namespace by appending a new segment
§Arguments
node_name- The node name for this nesting levelinvocation_id- The unique invocation identifier (typically UUID v4)
Sourcepub fn parent(&self) -> Option<Self>
pub fn parent(&self) -> Option<Self>
Get the parent namespace by removing the last segment
Returns None if this is already the root namespace.
Trait Implementations§
Source§impl Clone for CheckpointNamespace
impl Clone for CheckpointNamespace
Source§fn clone(&self) -> CheckpointNamespace
fn clone(&self) -> CheckpointNamespace
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CheckpointNamespace
impl Debug for CheckpointNamespace
Source§impl Default for CheckpointNamespace
impl Default for CheckpointNamespace
Source§fn default() -> CheckpointNamespace
fn default() -> CheckpointNamespace
Returns the “default value” for a type. Read more
Source§impl Display for CheckpointNamespace
impl Display for CheckpointNamespace
impl Eq for CheckpointNamespace
Source§impl From<&str> for CheckpointNamespace
impl From<&str> for CheckpointNamespace
Source§impl From<Vec<NamespaceSegment>> for CheckpointNamespace
impl From<Vec<NamespaceSegment>> for CheckpointNamespace
Source§fn from(segments: Vec<NamespaceSegment>) -> Self
fn from(segments: Vec<NamespaceSegment>) -> Self
Converts to this type from the input type.
Source§impl Hash for CheckpointNamespace
impl Hash for CheckpointNamespace
Source§impl PartialEq for CheckpointNamespace
impl PartialEq for CheckpointNamespace
Source§fn eq(&self, other: &CheckpointNamespace) -> bool
fn eq(&self, other: &CheckpointNamespace) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CheckpointNamespace
Auto Trait Implementations§
impl Freeze for CheckpointNamespace
impl RefUnwindSafe for CheckpointNamespace
impl Send for CheckpointNamespace
impl Sync for CheckpointNamespace
impl Unpin for CheckpointNamespace
impl UnsafeUnpin for CheckpointNamespace
impl UnwindSafe for CheckpointNamespace
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.