pub struct GraphNodeContext { /* private fields */ }Expand description
Exact, already-started execution context passed to one graph node.
Construction proves that the durable attempt and immutable state snapshot describe the same logical activation. The runtime creates this only after a node-attempt start has committed. Node code receives no storage transaction or mutable checkpoint handle.
Implementations§
Source§impl GraphNodeContext
impl GraphNodeContext
Sourcepub fn new(
attempt: NodeAttemptStartHead,
checkpoint: Arc<Checkpoint>,
cancellation: CancellationSignal,
) -> Result<Self, GraphNodeContextError>
pub fn new( attempt: NodeAttemptStartHead, checkpoint: Arc<Checkpoint>, cancellation: CancellationSignal, ) -> Result<Self, GraphNodeContextError>
Binds one committed attempt to its exact immutable checkpoint snapshot.
§Errors
Returns GraphNodeContextError if the attempt names another base
checkpoint, tenant, or run.
Sourcepub const fn attempt(&self) -> &NodeAttemptStartHead
pub const fn attempt(&self) -> &NodeAttemptStartHead
Returns the durable physical attempt proof.
Sourcepub fn checkpoint(&self) -> &Checkpoint
pub fn checkpoint(&self) -> &Checkpoint
Returns the exact immutable state and ready-set snapshot.
Sourcepub const fn cancellation(&self) -> &CancellationSignal
pub const fn cancellation(&self) -> &CancellationSignal
Returns the cooperative stop signal owned by the driver.
Sourcepub fn child_join(&self) -> Option<&GraphChildJoin>
pub fn child_join(&self) -> Option<&GraphChildJoin>
Published, verified children on a resumed activation. Reading does not consume the Join; the driver binds it to the eventual successful result.
Trait Implementations§
Source§impl Clone for GraphNodeContext
impl Clone for GraphNodeContext
Auto Trait Implementations§
impl !RefUnwindSafe for GraphNodeContext
impl !UnwindSafe for GraphNodeContext
impl Forget for GraphNodeContext
impl Freeze for GraphNodeContext
impl Move for GraphNodeContext
impl Send for GraphNodeContext
impl Sync for GraphNodeContext
impl Unpin for GraphNodeContext
impl UnsafeUnpin for GraphNodeContext
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more