Skip to main content

GraphSubgraphCall

Struct GraphSubgraphCall 

Source
pub struct GraphSubgraphCall { /* private fields */ }
Expand description

One static call-site replacement in a parent graph.

The parent call-site must declare only routes, with exactly one route named for each template return port. Their successors are the explicit return continuations. No executor is registered for the call-site or return ports.

Implementations§

Source§

impl GraphSubgraphCall

Source

pub const fn once(node_id: NodeId, subgraph: SharedStateSubgraph) -> Self

Instantiates a template once at the given parent call-site.

Source

pub fn bounded_loop( node_id: NodeId, subgraph: SharedStateSubgraph, repeat_port: NodeId, maximum_iterations: u16, ) -> Result<Self, GraphCompositionError>

Instantiates a bounded do/while-style loop.

Selecting repeat_port enters the next copy of the body, or follows the parent’s matching route on the last iteration. All other ports exit immediately. The exhaustion route is mandatory even if callers expect the loop to finish early. The bound is per call-site entry, not per run; the containing graph’s global superstep ceiling still applies.

§Errors

Rejects zero/oversized iteration bounds and a repeat port absent from the template. Composition additionally caps the entire expanded graph.

Source

pub fn with_return_routes<I>( self, routes: I, ) -> Result<Self, GraphCompositionError>
where I: IntoIterator<Item = (NodeId, RouteId)>,

Explicitly binds each return port to a graph-global parent route ID.

By default route names equal port names. Use this when instantiating the same template at several call-sites, since parent route IDs are globally unique. The complete mapping must be bijective; partial overrides and duplicate port/route identities are rejected.

Trait Implementations§

Source§

impl Clone for GraphSubgraphCall

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for GraphSubgraphCall

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.