pub struct EmbeddedAssistant { /* private fields */ }Expand description
The embedded assistant: the document’s bytes, the package compiled from them, and the contract surfaces an operator drives it through.
Construction is the verification: holding one of these is proof that the embedded document compiled, packaged, and carries every surface the session contract names.
Implementations§
Source§impl EmbeddedAssistant
impl EmbeddedAssistant
Sourcepub fn load() -> Result<Self, EmbeddedAssistantError>
pub fn load() -> Result<Self, EmbeddedAssistantError>
Compiles, packages, and verifies the embedded document.
§Errors
Returns EmbeddedAssistantError naming the stage that refused: parse,
a schema import the binary cannot carry, compilation, archive assembly,
package validation, or a session-contract surface the document does not
declare.
Sourcepub fn from_source(source: &'static str) -> Result<Self, EmbeddedAssistantError>
pub fn from_source(source: &'static str) -> Result<Self, EmbeddedAssistantError>
The whole preparation, over an arbitrary document.
Self::load is this applied to the embedded bytes. It is separate so
the session-contract verification can be exercised against a document
that deliberately omits a surface — a check nothing ever fails is a
check nobody has measured.
§Errors
As Self::load.
Sourcepub fn workflow_type(&self) -> &str
pub fn workflow_type(&self) -> &str
The workflow type an operator starts.
Sourcepub fn task_queue(&self) -> &str
pub fn task_queue(&self) -> &str
The assistant’s private task queue: the one a worker must serve for a
session to run, and never default.
Verified at load against private_task_queue, so this is the
document’s own declaration and the derivation at once — holding an
EmbeddedAssistant is proof they agree.
Sourcepub const fn content_hash(&self) -> &ContentHash
pub const fn content_hash(&self) -> &ContentHash
The package’s content hash — this document’s version identity.
Sourcepub const fn input_schema(&self) -> &Value
pub const fn input_schema(&self) -> &Value
The derived JSON Schema of the start input.
Sourcepub fn signals(&self) -> &[SignalContract]
pub fn signals(&self) -> &[SignalContract]
Every declared signal with its payload schema.
Sourcepub fn continuation_schema(&self) -> Result<&Value, EmbeddedAssistantError>
pub fn continuation_schema(&self) -> Result<&Value, EmbeddedAssistantError>
The continuation signal’s payload schema.
Present by construction: Self::load refuses a document that does not
declare CONTINUE_SIGNAL.
§Errors
Returns EmbeddedAssistantError::MissingSignal if the signal set is
ever mutated out from under construction — reported rather than assumed
away.
Trait Implementations§
Source§impl Clone for EmbeddedAssistant
impl Clone for EmbeddedAssistant
Source§fn clone(&self) -> EmbeddedAssistant
fn clone(&self) -> EmbeddedAssistant
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for EmbeddedAssistant
impl RefUnwindSafe for EmbeddedAssistant
impl Send for EmbeddedAssistant
impl Sync for EmbeddedAssistant
impl Unpin for EmbeddedAssistant
impl UnsafeUnpin for EmbeddedAssistant
impl UnwindSafe for EmbeddedAssistant
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request