Skip to main content

ApplicationBlueprint

Struct ApplicationBlueprint 

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

A caller-owned application blueprint containing process roots and module relations.

The blueprint describes declarations only. ApplicationBlueprint::project derives the reachable module set for one process without constructing modules.

Implementations§

Source§

impl ApplicationBlueprint

Source

pub fn new(application: ApplicationId) -> Self

Creates an empty architecture blueprint with a stable identity.

Source

pub fn add_module(&mut self, module: ModuleId) -> &mut Self

Declares a module that may be included in one or more process projections.

Source

pub fn add_execution( &mut self, execution: ExecutionId, module: ModuleId, ) -> &mut Self

Declares an execution root implemented by a module.

Source

pub fn add_process( &mut self, process: ProcessId, roots: Vec<ExecutionId>, ) -> &mut Self

Declares one or more execution roots for a runnable process projection.

Source

pub fn add_root( &mut self, process: ProcessId, execution: ExecutionId, module: ModuleId, ) -> &mut Self

Declares a process with one execution root: the module, its execution, and the process that runs only that execution.

Source

pub fn require_provider( &mut self, consumer: ModuleId, capability: CapabilityId, qualifier: Option<QualifierId>, provider: ModuleId, ) -> &mut Self

Connects a module requirement to its already selected capability provider.

Source

pub fn provide_capability( &mut self, module: ModuleId, capability: CapabilityId, qualifier: Option<QualifierId>, ) -> &mut Self

Declares that a module provides a capability for an optional qualifier.

Source

pub fn require_capability( &mut self, consumer: ModuleId, capability: CapabilityId, qualifier: Option<QualifierId>, optional: bool, ) -> &mut Self

Declares a capability requirement. Optional requirements do not activate a provider.

Source

pub fn select_provider( &mut self, consumer: ModuleId, capability: CapabilityId, qualifier: Option<QualifierId>, provider: ModuleId, ) -> &mut Self

Selects a provider for one module requirement.

Source

pub fn default_provider( &mut self, consumer: ModuleId, capability: CapabilityId, qualifier: Option<QualifierId>, provider: ModuleId, ) -> &mut Self

Declares a default provider for one module requirement.

Source

pub fn replace_provider( &mut self, capability: CapabilityId, qualifier: Option<QualifierId>, replaced: ModuleId, replacement: ModuleId, ) -> &mut Self

Replaces one provider with another for a capability and qualifier.

Source

pub fn exclude_module(&mut self, module: ModuleId) -> &mut Self

Excludes a module from provider selection and process reachability.

Source

pub fn consume_target( &mut self, consumer: ModuleId, target: ContributionTargetId, qualifier: QualifierId, ) -> &mut Self

Declares that a module consumes a qualified contribution target.

Source

pub fn add_contribution( &mut self, contributor: ModuleId, target: ContributionTargetId, qualifier: QualifierId, contribution: ContributionId, ) -> &mut Self

Declares that a module contributes to a qualified target.

Source

pub fn add_optional_contribution( &mut self, contributor: ModuleId, target: ContributionTargetId, qualifier: QualifierId, contribution: ContributionId, ) -> &mut Self

Declares an optional contribution that may be discarded without a target.

Source

pub fn project( &self, process: ProcessId, ) -> Result<ProcessProjection, ProjectionError>

Derives the reachable module projection from a process’s execution roots.

Source

pub fn freeze( self, process: ProcessId, ) -> Result<FrozenProcess, ProjectionError>

Resolves one process and consumes the mutable blueprint at the freeze boundary.

Source

pub fn freeze_processes( self, processes: &[ProcessId], ) -> Result<Vec<FrozenProcess>, ProjectionError>

Resolves selected processes from one blueprint and consumes it at freeze.

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> 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.