Struct wick_config::config::ComponentConfiguration
source · pub struct ComponentConfiguration { /* private fields */ }Expand description
A Wick component configuration.
A component configuration defines a wick component and its operations along with its dependencies immediate dependencies and any dependencies that it requires be provided by the user.
Implementations§
source§impl ComponentConfiguration
impl ComponentConfiguration
pub fn name(&self) -> Option<&String>
pub fn set_name<T: Into<Option<String>>>(&mut self, val: T) -> &mut Self
pub fn name_mut(&mut self) -> &mut Option<String>
pub fn component(&self) -> &ComponentImplementation
pub fn set_component<T: Into<ComponentImplementation>>( &mut self, val: T ) -> &mut Self
pub fn component_mut(&mut self) -> &mut ComponentImplementation
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 requires(&self) -> &[Binding<InterfaceDefinition>]
pub fn set_requires<T: Into<Binding<InterfaceDefinition>>>( &mut self, val: impl IntoIterator<Item = T> ) -> &mut Self
pub fn requires_mut(&mut self) -> &mut Vec<Binding<InterfaceDefinition>>
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 host(&self) -> Option<&HostConfig>
pub fn set_host<T: Into<Option<HostConfig>>>(&mut self, val: T) -> &mut Self
pub fn host_mut(&mut self) -> &mut Option<HostConfig>
pub fn tests(&self) -> &[TestConfiguration]
pub fn set_tests<T: Into<TestConfiguration>>( &mut self, val: impl IntoIterator<Item = T> ) -> &mut Self
pub fn tests_mut(&mut self) -> &mut Vec<TestConfiguration>
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 root_config(&self) -> Option<&RuntimeConfig>
pub fn set_root_config<T: Into<Option<RuntimeConfig>>>( &mut self, val: T ) -> &mut Self
pub fn root_config_mut(&mut self) -> &mut Option<RuntimeConfig>
source§impl ComponentConfiguration
impl ComponentConfiguration
sourcepub const fn try_composite(
&self
) -> Result<&CompositeComponentImplementation, Error>
pub const fn try_composite( &self ) -> Result<&CompositeComponentImplementation, Error>
Unwrap the inner composite component implementation or return an error.
sourcepub const fn try_wasm(&self) -> Result<&WasmComponentImplementation, Error>
pub const fn try_wasm(&self) -> Result<&WasmComponentImplementation, Error>
Unwrap the inner wasm component implementation or return an error.
sourcepub fn package_files(&self) -> Option<Assets<'_, AssetReference>>
pub fn package_files(&self) -> Option<Assets<'_, AssetReference>>
Get the package files
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 resolver(&self) -> Box<Resolver>
pub fn resolver(&self) -> Box<Resolver>
Returns a function that resolves a binding to a configuration item.
sourcepub const fn kind(&self) -> ComponentKind
pub const fn kind(&self) -> ComponentKind
Get the kind of this component implementation.
sourcepub fn allow_latest(&self) -> bool
pub fn allow_latest(&self) -> bool
Determine if the configuration allows for fetching artifacts with the :latest tag.
sourcepub fn insecure_registries(&self) -> Option<&[String]>
pub fn insecure_registries(&self) -> Option<&[String]>
Return the list of insecure registries defined in the manifest
sourcepub fn types(&self) -> Result<Vec<TypeDefinition>, Error>
pub fn types(&self) -> Result<Vec<TypeDefinition>, Error>
Return the types defined in this component.
sourcepub fn types_mut(&mut self) -> &mut Vec<TypeDefinition>
pub fn types_mut(&mut self) -> &mut Vec<TypeDefinition>
Get a mutable reference to the type definitions for this component.
pub fn config(&self) -> &[Field]
sourcepub fn signature(&self) -> Result<ComponentSignature, Error>
pub fn signature(&self) -> Result<ComponentSignature, Error>
Get the component signature for this configuration.
sourcepub fn into_v1_yaml(self) -> Result<String, Error>
pub fn into_v1_yaml(self) -> Result<String, Error>
Return the V1 yaml representation of this configuration.
sourcepub fn initialize(&mut self) -> Result<&Self, Error>
pub fn initialize(&mut self) -> Result<&Self, Error>
Initialize the configuration.
Trait Implementations§
source§impl AssetManager for ComponentConfiguration
impl AssetManager for ComponentConfiguration
type Asset = AssetReference
fn set_baseurl(&self, baseurl: &Path)
fn assets(&self) -> Assets<'_, AssetReference>
fn get_asset_flags(&self) -> u32
source§impl Clone for ComponentConfiguration
impl Clone for ComponentConfiguration
source§fn clone(&self) -> ComponentConfiguration
fn clone(&self) -> ComponentConfiguration
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more