pub struct MapSpec { /* private fields */ }Expand description
The spec for a map node: fan-out a sub-run per element of a typed list,
with a concurrency cap.
Implementations§
Source§impl MapSpec
impl MapSpec
Sourcepub fn new(
id: impl Into<String>,
over: impl Into<String>,
concurrency: u32,
body: MapBody,
) -> Self
pub fn new( id: impl Into<String>, over: impl Into<String>, concurrency: u32, body: MapBody, ) -> Self
Starts a map spec with its required fields: the node id, the opaque
reference to the list it fans out over, the concurrency cap, and the
MapBody each element is mapped through.
Sourcepub fn name(self, name: impl Into<String>) -> Self
pub fn name(self, name: impl Into<String>) -> Self
Sets a short display label for this node. Bounds (a 64-character cap,
not empty or all whitespace) are checked by [crate::validate], not
here; see crate::document’s “The optional node display name”
section for why this field, unlike an agent’s own name, is part of
the graph’s content hash.
Sourcepub fn output_schema(self, schema: Value) -> Self
pub fn output_schema(self, schema: Value) -> Self
Declares the JSON Schema for the joined list this node produces.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MapSpec
impl RefUnwindSafe for MapSpec
impl Send for MapSpec
impl Sync for MapSpec
impl Unpin for MapSpec
impl UnsafeUnpin for MapSpec
impl UnwindSafe for MapSpec
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