pub struct GateSpec { /* private fields */ }Expand description
The spec for a gate node: human approval that suspends the run.
Implementations§
Source§impl GateSpec
impl GateSpec
Sourcepub fn new(id: impl Into<String>, approval_schema: Value) -> Self
pub fn new(id: impl Into<String>, approval_schema: Value) -> Self
Starts a gate spec with its required fields: the node id and the JSON Schema the approval input must satisfy. A gate with no declared approval shape is meaningless, so the schema is not optional.
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.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GateSpec
impl RefUnwindSafe for GateSpec
impl Send for GateSpec
impl Sync for GateSpec
impl Unpin for GateSpec
impl UnsafeUnpin for GateSpec
impl UnwindSafe for GateSpec
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