Skip to main content

DeploymentCapabilities

Struct DeploymentCapabilities 

Source
pub struct DeploymentCapabilities {
    pub mail_relay: bool,
    pub wallet_link_ceremony: bool,
    pub email_magic_link_ceremony: bool,
    pub payments_proxy: bool,
}
Expand description

The deployment-configuration facts Requirements are checked against.

Resolved ONCE at control-plane startup from the same Option/Arc configuration each ceremony/proxy already builds for its own use (never a second, independent env read that could drift from what the ceremony itself decided), mirroring ConfiguredBackends in the harness’s main.rs: a struct of independent configuration facts, not states of one state machine — hence the flat bools below rather than a nested enum/state-machine shape.

Carried across the control-plane/harness wire as TurnInput.viable_requirements (the Requirement::as_str names this deployment satisfies) because the facts live in control-plane-only configuration (mail relay credentials, ceremony URLs, the payments signer) the harness sandbox cannot read for itself — the harness never resolves this struct locally; it reconstructs the viable subset with Self::from_names from the wire strings each turn.

Fields§

§mail_relay: bool§wallet_link_ceremony: bool§email_magic_link_ceremony: bool§payments_proxy: bool

Implementations§

Source§

impl DeploymentCapabilities

Source

pub const fn all() -> Self

Every Requirement viable — the standalone/dev/test posture, and the explicit choice a caller that genuinely does not care about deployment viability (a test scoping only builtin_allow, the in-process whole-conversation test transport) reaches for by name instead of hand-listing every field true. NOT the type’s DefaultDefault stays fail-closed (nothing viable), so a caller that forgets to thread the real wire-resolved value hides every requirement-gated built-in instead of silently over-advertising one whose deployment prerequisite is actually unmet.

Source

pub const fn is_viable(self, requirement: Requirement) -> bool

Whether this deployment currently satisfies requirement.

Source

pub fn all_viable(self, requirements: &[Requirement]) -> bool

Whether every member of requirements is viable — the join build_tool_executor folds into granted ∩ owned ∩ viable. An empty slice (a built-in with no deployment prerequisite) is always viable.

Source

pub fn viable_names(self) -> Vec<&'static str>

The stable kebab-case names of every Requirement this deployment satisfies, in Requirement::ALL order — what the control plane puts on the wire. Inverse of Self::from_names.

Source

pub fn from_names<'a, I: IntoIterator<Item = &'a str>>(names: I) -> Self

Reconstruct from the wire’s stable-name list (TurnInput.viable_requirements) — the harness’s side of Self::viable_names. An unrecognized name (a newer control plane’s requirement an older harness doesn’t know) is silently ignored rather than failing the turn: an unknown requirement can never be satisfied by an older binary’s is_viable match anyway, so any built-in that needs it stays hidden either way.

Trait Implementations§

Source§

impl Clone for DeploymentCapabilities

Source§

fn clone(&self) -> DeploymentCapabilities

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for DeploymentCapabilities

Source§

impl Debug for DeploymentCapabilities

Source§

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

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

impl Default for DeploymentCapabilities

Source§

fn default() -> DeploymentCapabilities

Returns the “default value” for a type. Read more
Source§

impl Eq for DeploymentCapabilities

Source§

impl PartialEq for DeploymentCapabilities

Source§

fn eq(&self, other: &DeploymentCapabilities) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for DeploymentCapabilities

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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, <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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more