pub struct RoutedSubstrate { /* private fields */ }Implementations§
Source§impl RoutedSubstrate
impl RoutedSubstrate
Sourcepub fn new(
store: Option<Store>,
default: String,
definition: StackDef,
recorded: BTreeMap<String, String>,
providers: BTreeMap<String, Box<dyn Substrate>>,
) -> Result<Self, SubstrateFault>
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
impl Debug for RoutedSubstrate
Source§impl Substrate for RoutedSubstrate
impl Substrate for RoutedSubstrate
fn capabilities(&self) -> Capabilities
Source§fn can_manage_resource(&self, resource: &ResourceRecord) -> bool
fn can_manage_resource(&self, resource: &ResourceRecord) -> bool
Route inventory records without granting ownership of their resources.
fn execution_plan(&self, def: &StackDef) -> Result<ExecutionPlan, DefError>
fn validate(&self, def: &StackDef) -> Result<(), SubstrateFault>
Source§fn validate_definition(&self, def: &StackDef) -> Result<(), SubstrateFault>
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
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).fn supports_source_override_for(&self, def: &StackDef, service: &str) -> bool
Source§fn default_lease(&self) -> Duration
fn default_lease(&self) -> Duration
Per-substrate lease default (§6).
Source§fn service_origin(
&self,
_def: &StackDef,
instance: &InstanceContext<'_>,
service: &str,
) -> String
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
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,
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.
fn step_revision(&self, ctx: &StepContext<'_>) -> Result<String, SubstrateFault>
Source§fn refresh_each_operation(&self, step: &Step) -> bool
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,
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,
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,
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,
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.
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,
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,
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,
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,
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.Auto Trait Implementations§
impl !RefUnwindSafe for RoutedSubstrate
impl !UnwindSafe for RoutedSubstrate
impl Freeze for RoutedSubstrate
impl Send for RoutedSubstrate
impl Sync for RoutedSubstrate
impl Unpin for RoutedSubstrate
impl UnsafeUnpin for RoutedSubstrate
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
Mutably borrows from an owned value. Read more