pub struct AppConfiguration { /* private fields */ }
Expand description

A Wick application configuration.

An application configuration defines a wick application, its trigger, imported component, etc and can be executed via wick run.

Implementations§

source§

impl AppConfiguration

source

pub fn name(&self) -> &str

source

pub fn set_name<T: Into<String>>(&mut self, val: T) -> &mut Self

source

pub fn name_mut(&mut self) -> &mut String

source

pub fn metadata(&self) -> Option<&Metadata>

source

pub fn set_metadata<T: Into<Option<Metadata>>>(&mut self, val: T) -> &mut Self

source

pub fn metadata_mut(&mut self) -> &mut Option<Metadata>

source

pub fn package(&self) -> Option<&PackageConfig>

source

pub fn set_package<T: Into<Option<PackageConfig>>>( &mut self, val: T ) -> &mut Self

source

pub fn package_mut(&mut self) -> &mut Option<PackageConfig>

source

pub fn import(&self) -> &[Binding<ImportDefinition>]

source

pub fn set_import<T: Into<Binding<ImportDefinition>>>( &mut self, val: impl IntoIterator<Item = T> ) -> &mut Self

source

pub fn import_mut(&mut self) -> &mut Vec<Binding<ImportDefinition>>

source

pub fn resources(&self) -> &[Binding<ResourceDefinition>]

source

pub fn set_resources<T: Into<Binding<ResourceDefinition>>>( &mut self, val: impl IntoIterator<Item = T> ) -> &mut Self

source

pub fn resources_mut(&mut self) -> &mut Vec<Binding<ResourceDefinition>>

source

pub fn triggers(&self) -> &[TriggerDefinition]

source

pub fn set_triggers<T: Into<TriggerDefinition>>( &mut self, val: impl IntoIterator<Item = T> ) -> &mut Self

source

pub fn triggers_mut(&mut self) -> &mut Vec<TriggerDefinition>

source

pub fn options(&self) -> Option<&FetchOptions>

source

pub fn set_options<T: Into<Option<FetchOptions>>>( &mut self, val: T ) -> &mut Self

source

pub fn options_mut(&mut self) -> &mut Option<FetchOptions>

source§

impl AppConfiguration

source

pub fn package_files(&self) -> Assets<'_, AssetReference>

Get the package files

source

pub fn resolve_type(&self, name: &str) -> Option<TypeDefinition>

Resolve an imported type by name.

source

pub fn resolve_binding( &self, name: &str ) -> Result<OwnedConfigurationItem, Error>

Get the configuration item a binding points to.

source

pub fn resolver(&self) -> Box<Resolver>

Returns a function that resolves a binding to a configuration item.

source

pub fn source(&self) -> Option<&Path>

Return the underlying version of the source manifest.

source

pub fn set_source(&mut self, source: &Path)

Set the source location of the configuration.

source

pub fn version(&self) -> Option<&str>

Return the version of the application.

source

pub fn add_resource<T: Into<String>>( &mut self, name: T, resource: ResourceDefinition )

Add a resource to the application configuration.

source

pub fn into_v1_yaml(self) -> Result<String, Error>

Generate V1 configuration yaml from this configuration.

source

pub const fn validate(&self) -> Result<(), Error>

Validate this configuration is good.

Trait Implementations§

source§

impl AssetManager for AppConfiguration

source§

impl Clone for AppConfiguration

source§

fn clone(&self) -> AppConfiguration

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for AppConfiguration

source§

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

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

impl Default for AppConfiguration

source§

fn default() -> AppConfiguration

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

impl Lockdown for AppConfiguration

source§

fn lockdown( &self, _id: Option<&str>, lockdown: &LockdownConfiguration ) -> Result<(), LockdownError>

Apply a lockdown configuration to the current configuration.
source§

impl Serialize for AppConfiguration

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 TryFrom<AppConfiguration> for AppConfiguration

§

type Error = ManifestError

The type returned in the event of a conversion error.
source§

fn try_from(def: AppConfiguration) -> Result<Self, Error>

Performs the conversion.
source§

impl TryFrom<AppConfiguration> for AppConfiguration

§

type Error = ManifestError

The type returned in the event of a conversion error.
source§

fn try_from(value: AppConfiguration) -> Result<Self, Self::Error>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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> 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 Twhere 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<T> for T

§

type Output = T

Should always be Self
§

impl<C> SignWithKey<String> for Cwhere C: ToBase64,

§

fn sign_with_key(self, key: &impl SigningAlgorithm) -> Result<String, Error>

§

impl<T> ToBase64 for Twhere T: Serialize,

§

fn to_base64(&self) -> Result<Cow<'_, str>, Error>

source§

impl<T> ToOwned for Twhere T: Clone,

§

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 Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

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
§

impl<T> Any for Twhere T: Any,

§

impl<T> CloneAny for Twhere T: Any + Clone,

§

impl<T> CloneAnySend for Twhere T: Any + Send + Clone,

§

impl<T> CloneAnySendSync for Twhere T: Any + Send + Sync + Clone,

§

impl<T> CloneAnySync for Twhere T: Any + Sync + Clone,

§

impl<S> ConditionallySend for Swhere S: Send + 'static,

§

impl<S> ConditionallySendSync for Swhere S: Send + Sync + 'static,

source§

impl<T> LocalAwareSend for Twhere T: Send,