Struct wick_config::config::AppConfiguration
source · 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: &str
) -> Result<OwnedConfigurationItem, Error>
pub fn resolve_binding( &self, name: &str ) -> 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 copy 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
§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
§type Error = ManifestError
type Error = ManifestError
The type returned in the event of a conversion error.
Auto Trait Implementations§
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