Skip to main content

RoutedSubstrate

Struct RoutedSubstrate 

Source
pub struct RoutedSubstrate { /* private fields */ }

Implementations§

Source§

impl RoutedSubstrate

Source

pub fn new( store: Option<Store>, default: String, definition: StackDef, recorded: BTreeMap<String, String>, providers: BTreeMap<String, Box<dyn Substrate>>, ) -> Result<Self, SubstrateFault>

Include adapters from both the desired definition and the retained journal. Construction performs no provider operations.

Trait Implementations§

Source§

impl Debug for RoutedSubstrate

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Substrate for RoutedSubstrate

Source§

fn name(&self) -> &str

The name instances are bound to at creation (--on <name>).
Source§

fn capabilities(&self) -> Capabilities

Source§

fn can_manage_resource(&self, resource: &ResourceRecord) -> bool

Route inventory records without granting ownership of their resources.
Source§

fn execution_plan(&self, def: &StackDef) -> Result<ExecutionPlan, DefError>

Source§

fn validate(&self, def: &StackDef) -> Result<(), SubstrateFault>

Source§

fn validate_definition(&self, def: &StackDef) -> Result<(), SubstrateFault>

Substrate-specific shape validation of the definition — core has already checked everything substrate-blind.
Source§

fn supports_source_override(&self) -> bool

Whether --source service=path pins are allowed here. Local substrates say yes; deploy-from-ref substrates say no (§1).
Source§

fn supports_source_override_for(&self, def: &StackDef, service: &str) -> bool

Source§

fn default_lease(&self) -> Duration

Per-substrate lease default (§6).
Source§

fn service_origin( &self, _def: &StackDef, instance: &InstanceContext<'_>, service: &str, ) -> String

The origin ${services.X.origin} resolves to for this substrate.
Source§

fn build_namespace( &self, _def: &StackDef, instance: &InstanceContext<'_>, prior: &[Checkpoint], secrets: &BTreeMap<String, String>, purpose: NamespacePurpose, ) -> Namespace

Build the interpolation namespace for one instance.
Source§

fn execute<'life0, 'life1, 'async_trait>( &'life0 self, ctx: StepContext<'life1>, ) -> Pin<Box<dyn Future<Output = Result<StepResource, SubstrateFault>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Execute one step, returning the resource for the journal.
Source§

fn step_revision(&self, ctx: &StepContext<'_>) -> Result<String, SubstrateFault>

Source§

fn refresh_each_operation(&self, step: &Step) -> bool

Whether a new operation must re-evaluate this step despite a matching revision.
Source§

fn reconcile<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, ctx: StepContext<'life1>, previous: &'life2 Checkpoint, ) -> Pin<Box<dyn Future<Output = Result<StepResource, SubstrateFault>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Apply changed inputs to an existing resource. Providers must preserve its ownership handle or explicitly replace and retire it in the journal.
Source§

fn observe<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, instance: &'life1 InstanceContext<'life2>, checkpoint: &'life3 Checkpoint, ) -> Pin<Box<dyn Future<Output = Result<Observation, SubstrateFault>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Re-check a recorded resource against reality.
Source§

fn destroy<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, instance: &'life1 InstanceContext<'life2>, checkpoint: &'life3 Checkpoint, ) -> Pin<Box<dyn Future<Output = Result<(), SubstrateFault>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Destroy a recorded resource. Returning Ok is a claim the engine immediately verifies with observe — silence is not success (invariant 4).
Source§

fn destroy_record<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, store: &'life1 Store, instance: &'life2 InstanceContext<'life3>, resource: &'life4 ResourceRecord, ) -> Pin<Box<dyn Future<Output = Result<(), SubstrateFault>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Recover and destroy unfinished inventory without losing newly discovered handles.
Source§

fn observe_record<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, store: &'life1 Store, instance: &'life2 InstanceContext<'life3>, resource: &'life4 ResourceRecord, ) -> Pin<Box<dyn Future<Output = Result<Observation, SubstrateFault>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Source§

fn restore_routes<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, store: &'life1 Store, instance: &'life2 InstanceContext<'life3>, ) -> Pin<Box<dyn Future<Output = Result<(), SubstrateFault>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Rebuild controller routes from verified runtime handles after restart.
Source§

fn finalize_teardown<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, instance: &'life1 InstanceContext<'life2>, ) -> Pin<Box<dyn Future<Output = Result<(), SubstrateFault>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Substrate-wide cleanup after verified teardown (e.g. delete a shared Stripe Projects environment).
Source§

fn spend<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Option<SpendInfo>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Structured spend for --json envelopes (§4). Substrates that spend nothing (local) return None.
Source§

fn fetch_logs<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>( &'life0 self, store: &'life1 Store, _def: &'life2 StackDef, instance: &'life3 InstanceContext<'life4>, services: &'life5 [String], tail: usize, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<ServiceLog>>, SubstrateFault>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait, 'life5: 'async_trait,

Recent logs for services (§2 — recent window, no streaming). None means this substrate has no log facility (the daemon never saw the processes and there is no remote log API); the CLI reports that rather than inventing output.
Source§

fn spend_line<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Option<String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Human spend line after up/down (§4 — never silently nothing).

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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 = !

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.