Skip to main content

ControlPrompt

Trait ControlPrompt 

Source
pub trait ControlPrompt {
    // Required method
    fn tag(&self) -> ControlTag;

    // Provided methods
    fn input(&self) -> Ref { ... }
    fn result_shape(&self) -> Ref { ... }
}
Expand description

Library-level contract for prompts raised by runtime organs.

Required Methods§

Source

fn tag(&self) -> ControlTag

Returns the stable tag identifying the prompt kind.

Provided Methods§

Source

fn input(&self) -> Ref

Returns the input reference supplied to the prompt body.

Source

fn result_shape(&self) -> Ref

Returns the shape reference expected for the prompt result.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§