Skip to main content

ExecutableApp

Struct ExecutableApp 

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

A validated executable operation graph.

Implementations§

Source§

impl ExecutableApp

Source

pub fn new( operations: impl IntoIterator<Item = ExecutableOperation>, ) -> Result<Self, ExecutableBuildError>

Validates and compiles executable operations.

§Errors

Returns ExecutableBuildError for invalid routes or unresolved dependencies.

Source

pub fn with_security_schemes( operations: impl IntoIterator<Item = ExecutableOperation>, schemes: impl IntoIterator<Item = SecuritySchemeDescriptor>, ) -> Result<Self, ExecutableBuildError>

Compiles executable operations with application security schemes.

§Errors

Returns ExecutableBuildError for invalid routes, security requirements, or unresolved dependencies.

Source

pub fn from_plugin(plugin: Plugin) -> Result<Self, ExecutableBuildError>

Compiles plugin scopes, singleton values, request provider plans, and executable operations.

§Errors

Returns ExecutableBuildError for invalid routes, plugin names, missing providers, cycles, invalid lifetimes, or singleton failures.

Source

pub fn from_plugin_with_overrides( plugin: Plugin, overrides: TestOverrides, ) -> Result<Self, ExecutableBuildError>

Compiles a plugin graph after applying typed test-only provider replacements.

Overrides are applied before graph validation and compilation, so mocks cannot bypass missing dependency, cycle, or lifetime diagnostics.

§Errors

Returns ExecutableBuildError for invalid overrides or for any normal plugin graph compilation failure.

Source

pub const fn definition(&self) -> &AppDefinition

Source

pub fn operation(&self, id: &OperationId) -> Option<&ExecutableOperation>

Source

pub fn operation_index(&self, id: &OperationId) -> Option<usize>

Source

pub fn operation_at(&self, index: usize) -> Option<&ExecutableOperation>

Source

pub fn operation_for_mcp_tool(&self, name: &str) -> Option<&ExecutableOperation>

Source

pub async fn invoke(&self, id: &OperationId, input: Value) -> ExecutionOutcome

Source

pub async fn invoke_controlled( &self, id: &OperationId, input: Value, control: InvocationControl, ) -> ExecutionOutcome

Source

pub async fn startup(&self) -> Result<(), DependencyError>

Runs application startup hooks in parent-before-child order.

§Errors

Returns the first startup hook failure and stops the remaining startup sequence.

Source

pub async fn shutdown(&self) -> Result<(), DependencyError>

Runs application shutdown hooks in child-before-parent order.

Every hook runs even when an earlier hook fails. The first error in execution order is returned after all cleanup has completed.

§Errors

Returns the first shutdown hook failure.

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> BackgroundExt for T

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> 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> ResponseExt for T

Source§

fn header( self, name: impl Into<String>, value: impl Into<String>, ) -> WithHeaders<Self>

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.