Skip to main content

ApplicationManifestV1

Struct ApplicationManifestV1 

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

Contract published by an application and consumed by any compatible runtime.

It contains application intent and requirements only. Provider selection, installation paths and secrets belong to the deployment manifest.

Implementations§

Source§

impl ApplicationManifestV1

Source

pub fn new( application_id: ApplicationId, application_version: impl Into<String>, display_name: impl Into<String>, vendor: impl Into<String>, service_id: ServiceId, runtime: RuntimeRequirements, ) -> ContractResult<Self>

Creates a minimal application manifest with conservative local defaults.

Source

pub fn with_capability( self, capability: CapabilityDeclaration, ) -> ContractResult<Self>

Adds a capability declaration.

Source

pub fn with_leadership( self, requirement: LeadershipRequirement, ) -> ContractResult<Self>

Adds a service-scoped leadership requirement.

Source

pub fn with_job_policy(self, policy: JobPolicy) -> ContractResult<Self>

Replaces the job policy.

Source

pub fn with_dependency( self, dependency: ApplicationDependency, ) -> ContractResult<Self>

Adds an application dependency.

Source

pub fn with_storage_requirements( self, requirements: StorageRequirements, ) -> Self

Replaces provider-independent storage requirements.

Source

pub fn with_scheduler_requirements( self, requirements: SchedulerRequirements, ) -> ContractResult<Self>

Replaces scheduler requirements.

Source

pub fn with_health_requirements( self, requirements: HealthRequirements, ) -> ContractResult<Self>

Replaces health requirements.

Source

pub fn with_update_policy(self, policy: UpdatePolicy) -> ContractResult<Self>

Replaces application update preferences.

Source

pub fn with_module(self, module: ModuleDeclaration) -> ContractResult<Self>

Adds an application module.

Source

pub fn with_feature_flag(self, feature: FeatureId, enabled: bool) -> Self

Sets one application feature flag.

Source

pub fn with_metadata( self, key: impl Into<String>, value: impl Into<String>, ) -> ContractResult<Self>

Adds non-sensitive, portable application metadata.

Source

pub fn manifest_version(&self) -> u16

Returns the manifest schema version.

Source

pub fn application_id(&self) -> &ApplicationId

Returns the stable application identity.

Source

pub fn application_version(&self) -> &str

Returns the application version.

Source

pub fn display_name(&self) -> &str

Returns the human-readable application name.

Source

pub fn vendor(&self) -> &str

Returns the application vendor.

Source

pub fn service_id(&self) -> &ServiceId

Returns the primary service identity.

Source

pub fn runtime_requirements(&self) -> &RuntimeRequirements

Returns runtime compatibility requirements.

Source

pub fn capabilities(&self) -> &[CapabilityDeclaration]

Returns declared capabilities.

Source

pub fn leadership(&self) -> &[LeadershipRequirement]

Returns service-scoped leadership requirements.

Source

pub fn job_policy(&self) -> &JobPolicy

Returns the job policy.

Source

pub fn dependencies(&self) -> &[ApplicationDependency]

Returns application dependencies.

Source

pub fn storage_requirements(&self) -> &StorageRequirements

Returns storage requirements.

Source

pub fn scheduler_requirements(&self) -> &SchedulerRequirements

Returns scheduler requirements.

Source

pub fn health_requirements(&self) -> &HealthRequirements

Returns health requirements.

Source

pub fn update_policy(&self) -> &UpdatePolicy

Returns update preferences.

Source

pub fn modules(&self) -> &[ModuleDeclaration]

Returns application modules.

Source

pub fn feature_flags(&self) -> &BTreeMap<FeatureId, bool>

Returns application feature flags.

Source

pub fn metadata(&self) -> &BTreeMap<String, String>

Returns non-sensitive portable metadata.

Source

pub fn validate(&self) -> ContractResult<()>

Validates the complete manifest and all cross-field invariants.

Trait Implementations§

Source§

impl Clone for ApplicationManifestV1

Source§

fn clone(&self) -> ApplicationManifestV1

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 Debug for ApplicationManifestV1

Source§

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

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

impl<'de> Deserialize<'de> for ApplicationManifestV1

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for ApplicationManifestV1

Source§

impl PartialEq for ApplicationManifestV1

Source§

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

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

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

Inequality operator !=. Read more
Source§

impl Serialize for ApplicationManifestV1

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for ApplicationManifestV1

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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

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.