Skip to main content

TypeBridgeConfigBuilder

Struct TypeBridgeConfigBuilder 

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

A consuming typed builder for TypeBridgeConfig.

The builder accepts only validated nested values. build performs the remaining cross-field and injected-service checks without loading schema or consulting any provider.

Implementations§

Source§

impl TypeBridgeConfigBuilder

Source

pub fn schema_set(self, path: SchemaSetPath) -> Self

Select the portable schema-set manifest.

Source

pub fn app_label(self, app_label: MigrationAppLabel) -> Self

Select the validated migration application label.

Source

pub fn exclusive_managed_scope(self, scope_id: ManagedScopeId) -> Self

Bind the durable managed-scope identity to the sole exclusive profile.

Source

pub fn semantic_profile(self, profile: SemanticProfileId) -> Self

Select the exact server-semantic profile.

Source

pub fn migration_v2_directory(self, directory: MigrationV2Directory) -> Self

Select the confined direct V2 migration directory.

Source

pub fn migration_policy(self, policy: MigrationSafetyPolicy) -> Self

Replace the default apply-side migration safety policy.

MigrationSafetyPolicy construction already rejects every standing allowance for destructive or opaque work, so no builder input spells a permanent force = true.

Source

pub fn require_capability(self, capability: CapabilityId) -> Self

Add one open capability requirement without replacing prior requirements.

Source

pub fn require_capabilities( self, capabilities: impl IntoIterator<Item = CapabilityId>, ) -> Self

Add capability requirements without replacing prior requirements.

Source

pub fn output(self, target: BindingTarget, directory: OutputDirectory) -> Self

Add one independently regenerated shipped binding target.

Source

pub fn type_name_override( self, target: BindingTarget, type_id: TypeId, name: impl Into<String>, ) -> Self

Override a generated model name while retaining its canonical database identity.

Source

pub fn schema_authority_output(self, output: SchemaAuthorityOutputPath) -> Self

Select the generated server schema-authority artifact path.

Source

pub fn environment( self, name: impl Into<String>, environment: WorkspaceEnvironment, ) -> Self

Add one named deployment environment.

Source

pub fn secret(self, slot: SecretSlot, reference: SecretReference) -> Self

Add one retained symbolic secret reference.

Source

pub fn require_extension(self, requirement: ExtensionRequirement) -> Self

Add one exact local extension requirement.

Source

pub fn build( self, services: &TypeBridgeConfigServices<'_>, ) -> Result<TypeBridgeConfig, WorkspaceConfigError>

Validate the complete config using only the explicitly injected services.

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

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
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.