pub struct GraphNode { /* private fields */ }Expand description
Declarative control surface for one stable graph node.
Implementations§
Source§impl GraphNode
impl GraphNode
Sourcepub fn new(
node_id: NodeId,
continue_to: Option<ReadyNodes>,
routes: GraphRoutes,
wait_to: Option<ReadyNodes>,
terminal: bool,
) -> Result<Self, GraphNodeError>
pub fn new( node_id: NodeId, continue_to: Option<ReadyNodes>, routes: GraphRoutes, wait_to: Option<ReadyNodes>, terminal: bool, ) -> Result<Self, GraphNodeError>
Constructs one compiled node control declaration.
continue_to is selected by NodeControl::Continue, routes by
NodeControl::Route, and wait_to is the ready set retained while a
NodeControl::Wait suspends the run. terminal authorizes one exact
terminal output. Every non-terminal successor set must be non-empty.
§Errors
Returns GraphNodeError when the node exposes no control outcome or
declares an empty continuation/wait successor set.
Sourcepub const fn continue_to(&self) -> Option<&ReadyNodes>
pub const fn continue_to(&self) -> Option<&ReadyNodes>
Returns successors selected by an unconditional continuation.
Sourcepub const fn routes(&self) -> &GraphRoutes
pub const fn routes(&self) -> &GraphRoutes
Returns declared conditional routes.
Sourcepub const fn wait_to(&self) -> Option<&ReadyNodes>
pub const fn wait_to(&self) -> Option<&ReadyNodes>
Returns successors retained by a durable wait outcome.
Sourcepub const fn allows_terminal(&self) -> bool
pub const fn allows_terminal(&self) -> bool
Returns whether this node may complete the graph.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for GraphNode
impl<'de> Deserialize<'de> for GraphNode
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for GraphNode
Source§impl JsonSchema for GraphNode
impl JsonSchema for GraphNode
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreimpl StructuralPartialEq for GraphNode
Auto Trait Implementations§
impl Forget for GraphNode
impl Freeze for GraphNode
impl Move for GraphNode
impl RefUnwindSafe for GraphNode
impl Send for GraphNode
impl Sync for GraphNode
impl Unpin for GraphNode
impl UnsafeUnpin for GraphNode
impl UnwindSafe for GraphNode
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