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_wasmrs(&self) -> Result<&WasmRsComponent, Error>
pub const fn try_wasmrs(&self) -> Result<&WasmRsComponent, 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 moreSource§impl Debug for ComponentConfiguration
impl Debug for ComponentConfiguration
Source§impl Default for ComponentConfiguration
impl Default for ComponentConfiguration
Source§fn default() -> ComponentConfiguration
fn default() -> ComponentConfiguration
Source§impl Lockdown for ComponentConfiguration
impl Lockdown for ComponentConfiguration
Source§fn lockdown(
&self,
id: Option<&str>,
lockdown: &LockdownConfiguration,
) -> Result<(), LockdownError>
fn lockdown( &self, id: Option<&str>, lockdown: &LockdownConfiguration, ) -> Result<(), LockdownError>
Source§impl Serialize for ComponentConfiguration
impl Serialize for ComponentConfiguration
Source§impl TryFrom<ComponentConfiguration> for ComponentConfiguration
impl TryFrom<ComponentConfiguration> for ComponentConfiguration
Source§type Error = ManifestError
type Error = ManifestError
Source§impl TryFrom<ComponentConfiguration> for ComponentConfiguration
impl TryFrom<ComponentConfiguration> for ComponentConfiguration
Source§type Error = ManifestError
type Error = ManifestError
Source§impl TryFrom<HostManifest> for ComponentConfiguration
impl TryFrom<HostManifest> for ComponentConfiguration
Source§type Error = ManifestError
type Error = ManifestError
Auto Trait Implementations§
impl Freeze for ComponentConfiguration
impl !RefUnwindSafe for ComponentConfiguration
impl Send for ComponentConfiguration
impl Sync for ComponentConfiguration
impl Unpin for ComponentConfiguration
impl !UnwindSafe for ComponentConfiguration
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,
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>
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