pub struct AppManifest {
pub spin_manifest_version: FixedVersion<2>,
pub application: AppDetails,
pub variables: IndexMap<LowerSnakeId, Variable>,
pub triggers: IndexMap<String, Vec<Trigger>>,
pub components: IndexMap<KebabId, Component>,
}Expand description
App manifest
Fields§
§spin_manifest_version: FixedVersion<2>spin_manifest_version = 2
application: AppDetails[application]
variables: IndexMap<LowerSnakeId, Variable>Application configuration variables. These can be set via environment variables, or from sources such as Hashicorp Vault or Azure KeyVault by using a runtime config file. They are not available directly to components: use a component variable to ingest them.
Learn more: https://spinframework.dev/variables, https://spinframework.dev/dynamic-configuration#application-variables-runtime-configuration
triggers: IndexMap<String, Vec<Trigger>>The triggers to which the application responds. Most triggers can appear
multiple times with different parameters: for example, the http trigger may
appear multiple times with different routes, or the redis trigger with
different channels.
Example: [[trigger.http]]
components: IndexMap<KebabId, Component>[component.<id>]
Implementations§
Source§impl AppManifest
impl AppManifest
Sourcepub fn validate_dependencies(&self) -> Result<()>
pub fn validate_dependencies(&self) -> Result<()>
This method ensures that the dependencies of each component are valid.
Sourcepub fn ensure_profile(&self, profile: Option<&str>) -> Result<()>
pub fn ensure_profile(&self, profile: Option<&str>) -> Result<()>
Whether any component in the application defines the given profile.
Not every component defines every profile, and components intentionally
fall back to the anonymouse profile if they are asked for a profile
they don’t define. So this can be used to detect that a user might have
mistyped a profile (e.g. spin up --profile deugb).
Trait Implementations§
Source§impl Clone for AppManifest
impl Clone for AppManifest
Source§fn clone(&self) -> AppManifest
fn clone(&self) -> AppManifest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AppManifest
impl Debug for AppManifest
Source§impl<'de> Deserialize<'de> for AppManifest
impl<'de> Deserialize<'de> for AppManifest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for AppManifest
impl JsonSchema for AppManifest
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for AppManifest
impl RefUnwindSafe for AppManifest
impl Send for AppManifest
impl Sync for AppManifest
impl Unpin for AppManifest
impl UnsafeUnpin for AppManifest
impl UnwindSafe for AppManifest
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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