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
impl AppConfiguration
pub fn name(&self) -> &str
pub fn set_name<T: Into<String>>(&mut self, val: T) -> &mut Self
pub fn name_mut(&mut self) -> &mut String
pub fn metadata(&self) -> Option<&Metadata>
pub fn set_metadata<T: Into<Option<Metadata>>>(&mut self, val: T) -> &mut Self
pub fn metadata_mut(&mut self) -> &mut Option<Metadata>
pub fn package(&self) -> Option<&PackageConfig>
pub fn set_package<T: Into<Option<PackageConfig>>>( &mut self, val: T, ) -> &mut Self
pub fn package_mut(&mut self) -> &mut Option<PackageConfig>
pub fn import(&self) -> &[Binding<ImportDefinition>]
pub fn set_import<T: Into<Binding<ImportDefinition>>>( &mut self, val: impl IntoIterator<Item = T>, ) -> &mut Self
pub fn import_mut(&mut self) -> &mut Vec<Binding<ImportDefinition>>
pub fn resources(&self) -> &[Binding<ResourceDefinition>]
pub fn set_resources<T: Into<Binding<ResourceDefinition>>>( &mut self, val: impl IntoIterator<Item = T>, ) -> &mut Self
pub fn resources_mut(&mut self) -> &mut Vec<Binding<ResourceDefinition>>
pub fn triggers(&self) -> &[TriggerDefinition]
pub fn set_triggers<T: Into<TriggerDefinition>>( &mut self, val: impl IntoIterator<Item = T>, ) -> &mut Self
pub fn triggers_mut(&mut self) -> &mut Vec<TriggerDefinition>
pub fn options(&self) -> Option<&FetchOptions>
pub fn set_options<T: Into<Option<FetchOptions>>>( &mut self, val: T, ) -> &mut Self
pub fn options_mut(&mut self) -> &mut Option<FetchOptions>
Source§impl AppConfiguration
impl AppConfiguration
Sourcepub fn package_files(&self) -> Assets<'_, AssetReference>
pub fn package_files(&self) -> Assets<'_, AssetReference>
Get the package files
Sourcepub fn resolve_type(&self, name: &str) -> Option<TypeDefinition>
pub fn resolve_type(&self, name: &str) -> Option<TypeDefinition>
Resolve an imported type by name.
Sourcepub fn resolve_binding(
&self,
name: &BoundIdentifier,
) -> Result<OwnedConfigurationItem, Error>
pub fn resolve_binding( &self, name: &BoundIdentifier, ) -> Result<OwnedConfigurationItem, Error>
Get the configuration item a binding points to.
Sourcepub fn resolver(&self) -> Box<Resolver>
pub fn resolver(&self) -> Box<Resolver>
Returns a function that resolves a binding to a configuration item.
Sourcepub fn set_source(&mut self, source: &Path)
pub fn set_source(&mut self, source: &Path)
Set the source location of the configuration.
Sourcepub fn add_resource<T: Into<String>>(
&mut self,
name: T,
resource: ResourceDefinition,
)
pub fn add_resource<T: Into<String>>( &mut self, name: T, resource: ResourceDefinition, )
Add a resource to the application configuration.
Sourcepub fn into_v1_yaml(self) -> Result<String, Error>
pub fn into_v1_yaml(self) -> Result<String, Error>
Generate V1 configuration yaml from this configuration.
Trait Implementations§
Source§impl AssetManager for AppConfiguration
impl AssetManager for AppConfiguration
type Asset = AssetReference
fn set_baseurl(&self, baseurl: &Path)
fn assets(&self) -> Assets<'_, AssetReference>
fn get_asset_flags(&self) -> u32
Source§impl Clone for AppConfiguration
impl Clone for AppConfiguration
Source§fn clone(&self) -> AppConfiguration
fn clone(&self) -> AppConfiguration
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AppConfiguration
impl Debug for AppConfiguration
Source§impl Default for AppConfiguration
impl Default for AppConfiguration
Source§fn default() -> AppConfiguration
fn default() -> AppConfiguration
Returns the “default value” for a type. Read more
Source§impl Lockdown for AppConfiguration
impl Lockdown for AppConfiguration
Source§fn lockdown(
&self,
_id: Option<&str>,
lockdown: &LockdownConfiguration,
) -> Result<(), LockdownError>
fn lockdown( &self, _id: Option<&str>, lockdown: &LockdownConfiguration, ) -> Result<(), LockdownError>
Apply a lockdown configuration to the current configuration.
Source§impl Serialize for AppConfiguration
impl Serialize for AppConfiguration
Source§impl TryFrom<AppConfiguration> for AppConfiguration
impl TryFrom<AppConfiguration> for AppConfiguration
Source§type Error = ManifestError
type Error = ManifestError
The type returned in the event of a conversion error.
Source§impl TryFrom<AppConfiguration> for AppConfiguration
impl TryFrom<AppConfiguration> for AppConfiguration
Source§type Error = ManifestError
type Error = ManifestError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl Freeze for AppConfiguration
impl !RefUnwindSafe for AppConfiguration
impl Send for AppConfiguration
impl Sync for AppConfiguration
impl Unpin for AppConfiguration
impl !UnwindSafe for AppConfiguration
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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 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>
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